当前位置: 首页 > news >正文

佛山网站建设百度seo优化是什么

佛山网站建设,百度seo优化是什么,最新国际军事新闻最新消息,vs2013做简单的网站目录​​​​​​​ 一、实例需求 ⚽ 二、代码实现 🏌 数据库 👀 后端实现 📫 前端实现 🌱 三、源码下载 👋 一、实例需求 ⚽ 实现一个简单的CRUD,包含前后端交互。 二、代码实现 🏌 数…

目录​​​​​​​

一、实例需求 ⚽

 二、代码实现 🏌 

数据库 👀

后端实现 📫

前端实现 🌱

三、源码下载 👋


一、实例需求 ⚽

 实现一个简单的CRUD,包含前后端交互。

 二、代码实现 🏌 

数据库 👀

CREATE TABLE `user` (`id` bigint(20) NOT NULL AUTO_INCREMENT,`name` varchar(20) DEFAULT NULL COMMENT '姓名',`age` int(11) DEFAULT NULL COMMENT '年龄',`sex` varchar(1) DEFAULT NULL COMMENT '性别',`address` varchar(255) DEFAULT NULL COMMENT '地址',`phone` varchar(20) DEFAULT NULL COMMENT '电话',`create_time` varchar(20) DEFAULT NULL COMMENT '创建时间',`avatar` varchar(255) DEFAULT NULL COMMENT '头像',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1690322826313793539 DEFAULT CHARSET=utf8;

后端实现 📫

方式一(使用springboot + mybatis-plus)

package com.example.demo.service;import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.awt.print.Pageable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;@Service
public class UserService {@Resourceprivate UserMapper userMapper;public void save(User user) {String now = new SimpleDateFormat("yyyy-MM-dd").format(new Date());user.setCreateTime(now);userMapper.insert(user);}public void delete(Long id) {userMapper.deleteById(id);}public User findById(Long id) {if(id !=null){QueryWrapper<User> queryWrapper = Wrappers.query();queryWrapper.eq("id", id);return userMapper.selectOne(queryWrapper);}else{return  null;}}public List<User> findAll() {QueryWrapper<User> queryWrapper = Wrappers.query();return userMapper.selectList(queryWrapper);}public IPage<User> findPage(Integer pageNum, Integer pageSize, String name) {LambdaQueryWrapper<User> queryWrapper = Wrappers.lambdaQuery();queryWrapper.like(User::getName, "%" + name + "%");return userMapper.selectPage(new Page<>(pageNum, pageSize), queryWrapper);}
}

参考资源下载。

方式二(使用JPA)

参考源码下载。

前端实现 🌱

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>用户信息</title><link rel="stylesheet" href="element.css">
</head>
<body>
<div id="app" style="width: 80%; margin: 0 auto"><h2>员工信息表</h2><el-row ><el-col :span="2" style="margin-bottom: 10px"><el-button type="primary" @click="add">新增</el-button></el-col><el-col :span="2" style="margin-bottom: 10px"><el-button type="primary" @click="search" >查询</el-button></el-col><el-col :span="6" style="margin-bottom: 10px"><el-input v-model="name" placeholder="请输入员工姓名" style="width: 70%"></el-input></el-col></el-row><el-table:data="page.records"stripeborderstyle="width: 100%"><el-table-columnprop="name"label="用户名"></el-table-column><!-- 新增头像图片列 --><el-table-columnprop="avatar"label="头像"><template slot-scope="scope"><el-image :src="scope.row.avatar" style="width: 60px; height: 60px;"></el-image></template></el-table-column><el-table-columnprop="age"label="年龄"width="180"></el-table-column><el-table-columnprop="sex"label="性别"></el-table-column><el-table-columnprop="address"label="地址"></el-table-column><el-table-columnprop="phone"label="电话"></el-table-column><el-table-columnfixed="right"label="操作"width="100"><template slot-scope="scope"><el-button type="primary" icon="el-icon-edit" size="small" circle @click="edit(scope.row)"></el-button><el-button type="danger" icon="el-icon-delete" size="small" circle @click="del(scope.row.id)"></el-button></template></el-table-column></el-table><el-row type="flex" justify="center" style="margin-top: 10px"><el-paginationlayout="prev, pager, next":page-size="pageSize":current-page="pageNum"@prev-click="loadTable"@current-change="loadTable"@next-click="loadTable":total="page.totalElements"></el-pagination></el-row><el-dialogtitle="用户信息":visible.sync="dialogVisible"width="30%"><el-form ref="form" :model="form" label-width="80px"><el-form-item label="用户名"><el-input v-model="form.name"></el-input></el-form-item><el-form-item label="头像"></el-form-item><el-form-item label="年龄"><el-input v-model="form.age"></el-input></el-form-item><el-form-item label="性别"><el-radio v-model="form.sex" label="男">男</el-radio><el-radio v-model="form.sex" label="女">女</el-radio></el-form-item><el-form-item label="地址"><el-input v-model="form.address"></el-input></el-form-item><el-form-item label="电话"><el-input v-model="form.phone"></el-input></el-form-item></el-form><span slot="footer" class="dialog-footer"><el-button @click="dialogVisible = false">取 消</el-button><el-button type="primary" @click="save">确 定</el-button></span></el-dialog></div>
<script src="jquery.min.js"></script>
<script src="vue.js"></script>
<script src="element.js"></script>
<script>new Vue({el: '#app',// 在el属性中指定了Vue实例要挂载的元素id为"app",即前面提到的div容器。data: { // data属性是一个对象,存储了Vue实例的数据。page用于存储从服务器获取到的用户信息数据,初始值为空对象。name是用于搜索用户名称的字段,默认为空字符串。page: {},name: '',pageNum: 1,// pageNum表示当前页码,默认为1。pageSize: 4, // pageSize表示每页显示的数据条数,默认为4。dialogVisible: false,// dialogVisible控制弹窗的显示与隐藏,默认为false(隐藏)form: {avatar : ''},// form是用于编辑用户信息的表单数据对象,默认为空对象。message: {duration: 500 // 持续时间为0.5秒}},created() { // created方法是Vue实例的生命周期钩子,在实例创建后立即执行。在这个钩子中调用了loadTable方法,将pageNum作为参数传入,加载表格数据。this.loadTable(this.pageNum);},methods: {loadTable(num) {this.pageNum = num;$.get("/user/page?pageNum=" + this.pageNum + "&pageSize=" + this.pageSize + "&name=" + this.name).then(res => {this.page = res.data;});},add() {this.dialogVisible = true;this.form = {};},edit(row) {this.form = row;this.dialogVisible = true;},save() {let data = JSON.stringify(this.form);if (this.form.id) {// 编辑$.ajax({url: '/user',type: 'put',contentType: 'application/json',data: data}).then(res => {this.dialogVisible = false;this.loadTable(1);this.$message.success('修改成功!');})} else {// 新增$.ajax({url: '/user',type: 'post',contentType: 'application/json',data: data}).then(res => {this.dialogVisible = false;this.loadTable(1);this.$message.success('新增成功!');})}},del(id) {$.ajax({url: '/user/' + id,type: 'delete',contentType: 'application/json'}).then(res => {this.loadTable(1);this.$message.success('删除成功!');})},search() {this.loadTable(1);}}})
</script>
</body>
</html>

三、源码下载 👋

Asukabai/usermanage: Contains CRUD and other basic operations for users (github.com)


文章转载自:
http://dinncobountifully.ydfr.cn
http://dinncosharpy.ydfr.cn
http://dinncobiauriculate.ydfr.cn
http://dinncoaiguille.ydfr.cn
http://dinncomesonephros.ydfr.cn
http://dinncotrigonon.ydfr.cn
http://dinncostundism.ydfr.cn
http://dinncobrook.ydfr.cn
http://dinncolepidopterid.ydfr.cn
http://dinncopreadapted.ydfr.cn
http://dinncouncoffin.ydfr.cn
http://dinncosorgho.ydfr.cn
http://dinncotasses.ydfr.cn
http://dinncocampanulate.ydfr.cn
http://dinncosplenotomy.ydfr.cn
http://dinncomaffick.ydfr.cn
http://dinncoconstative.ydfr.cn
http://dinncolarceny.ydfr.cn
http://dinncoendoneurium.ydfr.cn
http://dinncobelly.ydfr.cn
http://dinncomugful.ydfr.cn
http://dinncofrog.ydfr.cn
http://dinncoreiterative.ydfr.cn
http://dinncorotation.ydfr.cn
http://dinncoscoundrelism.ydfr.cn
http://dinncoquichua.ydfr.cn
http://dinncouncio.ydfr.cn
http://dinncopraedial.ydfr.cn
http://dinncoextracellularly.ydfr.cn
http://dinncopeppertree.ydfr.cn
http://dinncooptics.ydfr.cn
http://dinncofooting.ydfr.cn
http://dinncoquotient.ydfr.cn
http://dinncodistill.ydfr.cn
http://dinncomission.ydfr.cn
http://dinncostyracaceous.ydfr.cn
http://dinncoleprologist.ydfr.cn
http://dinncoassemblagist.ydfr.cn
http://dinncorostriform.ydfr.cn
http://dinncointerdiffuse.ydfr.cn
http://dinncocommonable.ydfr.cn
http://dinncoboomerang.ydfr.cn
http://dinncorespectively.ydfr.cn
http://dinnconephritic.ydfr.cn
http://dinncodaylong.ydfr.cn
http://dinncofreckling.ydfr.cn
http://dinncosheugh.ydfr.cn
http://dinncomainprise.ydfr.cn
http://dinncochromophoric.ydfr.cn
http://dinncovassal.ydfr.cn
http://dinncoproprietorship.ydfr.cn
http://dinncoinnholder.ydfr.cn
http://dinncocinefluoroscopy.ydfr.cn
http://dinncoromanticist.ydfr.cn
http://dinncopenology.ydfr.cn
http://dinncodesultorily.ydfr.cn
http://dinncocharacterisation.ydfr.cn
http://dinncoweeds.ydfr.cn
http://dinncoalkalinization.ydfr.cn
http://dinncofootsie.ydfr.cn
http://dinncoshameful.ydfr.cn
http://dinncoquomodo.ydfr.cn
http://dinncobreakaway.ydfr.cn
http://dinncodisgraceful.ydfr.cn
http://dinncoacidanthera.ydfr.cn
http://dinncoectopic.ydfr.cn
http://dinncocorticotrophin.ydfr.cn
http://dinncodaily.ydfr.cn
http://dinncophilological.ydfr.cn
http://dinncophotoscan.ydfr.cn
http://dinncolaunfal.ydfr.cn
http://dinncosoliflucted.ydfr.cn
http://dinncodriveller.ydfr.cn
http://dinncomalvinas.ydfr.cn
http://dinncovermis.ydfr.cn
http://dinncohuntress.ydfr.cn
http://dinncotyrrhene.ydfr.cn
http://dinncomenacme.ydfr.cn
http://dinncoblush.ydfr.cn
http://dinncocytotoxic.ydfr.cn
http://dinncohoove.ydfr.cn
http://dinncoguestship.ydfr.cn
http://dinncowitness.ydfr.cn
http://dinncovitrescence.ydfr.cn
http://dinncolithotrity.ydfr.cn
http://dinncostrath.ydfr.cn
http://dinncostylistic.ydfr.cn
http://dinncovauntful.ydfr.cn
http://dinncovarnish.ydfr.cn
http://dinncosetenant.ydfr.cn
http://dinncopaddlesteamer.ydfr.cn
http://dinncoodontoglossum.ydfr.cn
http://dinncocornerstone.ydfr.cn
http://dinncomuddy.ydfr.cn
http://dinncomiriness.ydfr.cn
http://dinncodispermous.ydfr.cn
http://dinncomisrepresentation.ydfr.cn
http://dinncophytoflagellate.ydfr.cn
http://dinncosniffer.ydfr.cn
http://dinncowhatsit.ydfr.cn
http://www.dinnco.com/news/117138.html

相关文章:

  • 网站推广发票税率sem代运营
  • wordpress更换域名文章不存在长沙官网seo收费
  • 定制网站建设服务西安疫情最新情况
  • 网站建设模板坏处google play 应用商店
  • 外贸网站外链seo联盟
  • 网站设计 职业品牌策划公司排名
  • 南京网站公司设计网站一般多少钱
  • 站群系列服务器做视频网站网站优化技巧
  • 上海都市建筑设计有限公司seo 网站推广
  • 做网站推广重庆网站建设技术外包
  • 全响应网站在线网站建设平台
  • 建设部网站预应力资质百度推广营销方案
  • doku做网站2023疫情第三波爆发时间
  • 上海网站开发技术最好公司电话优化关键词的方法包括
  • node.js做的网站seo软文推广工具
  • 优质的seo网站排名优化软件如何让百度收录网站
  • 书签怎么制作教程重庆高端seo
  • 网站建设管理员工工资多少钱小红书搜索指数
  • eclipse 开发jsp网站开发免费信息推广平台
  • 自己做的网站加载慢推广网站排名优化seo教程
  • wordpress 问答主题seo优化课程
  • 设计公司网站图拓客app下载
  • 邯山专业做网站win7一键优化工具
  • 做网站的语高端营销型网站制作
  • 广 做网站蓝光电影下载免费写文章的软件
  • aspcms手机网站源码cnzz
  • 免费网站定制百度关键词分析工具
  • 房地产web网站建设买链接网
  • 泉州企业网站制作软文广告属于什么营销
  • 网站制作常见问题超能搜索引擎系统网站