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

湖南省建设厅假网站建设网站的命令

湖南省建设厅假网站,建设网站的命令,做网站内容图片多大,wordpress上传过大锋哥原创的SpringbootLayui python222网站实战#xff1a; python222网站实战课程视频教程#xff08;SpringBootPython爬虫实战#xff09; ( 火爆连载更新中... )_哔哩哔哩_bilibilipython222网站实战课程视频教程#xff08;SpringBootPython爬虫实战#xff09; ( 火…锋哥原创的SpringbootLayui python222网站实战 python222网站实战课程视频教程SpringBootPython爬虫实战 ( 火爆连载更新中... )_哔哩哔哩_bilibilipython222网站实战课程视频教程SpringBootPython爬虫实战 ( 火爆连载更新中... )共计23条视频包括python222网站实战课程视频教程SpringBootPython爬虫实战 ( 火爆连载更新中... )、第2讲 架构搭建实现、第3讲 页面系统属性动态化设计实现等UP主更多精彩视频请关注UP账号。https://www.bilibili.com/video/BV1yX4y1a7qM/ 我们有些文章比如自我介绍帖子vip课程帖子这种区别于正常发文文章的帖子我们可以单独管理设计成自定义帖子模块。 新建t_post表 create table t_post (id int (11),title varchar (600),content text ); insert into t_post (id, title, content) values(2,2,NULL); insert into t_post (id, title, content) values(3,3,p222/p\n); insert into t_post (id, title, content) values(5,4测试444,p32324444img alt\\ src\/articleImages/20230615120852.jpg\ style\height:1372px; width:720px\ //p\n);用Mybatis-X生成代码 新建PostAdminController类 package com.python222.controller.admin;import com.python222.entity.Post; import com.python222.service.PostService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController;import java.util.HashMap; import java.util.List; import java.util.Map;/*** 管理员-自定义帖子控制器* author python222小锋老师* site www.python222.com*/ RestController RequestMapping(value /admin/post) public class PostAdminController {Autowiredprivate PostService postService;/*** 根据条件查询自定义帖子* return* throws Exception*/RequestMapping(value /list)public MapString,Object list()throws Exception{MapString, Object resultMap new HashMap();ListPost postListpostService.list();resultMap.put(code, 0);resultMap.put(data, postList);return resultMap;}/*** 添加或者修改自定义帖子* param post* return*/RequestMapping(/save)public MapString,Object save(Post post){if(post.getId()null){postService.save(post);}else{postService.updateById(post);}MapString, Object resultMap new HashMap();resultMap.put(success, true);return resultMap;}/*** 删除自定义帖子* param id* return* throws Exception*/RequestMapping(/delete)public MapString,Object delete(Integer id)throws Exception{MapString, Object resultMap new HashMap();postService.removeById(id);resultMap.put(success, true);return resultMap;}/*** 根据id查询自定义帖子实体* param id* return* throws Exception*/RequestMapping(/findById)public MapString,Object findById(Integer id)throws Exception{MapString, Object resultMap new HashMap();Post postpostService.getById(id);resultMap.put(post, post);resultMap.put(success, true);return resultMap;}} 前端postManage.html !DOCTYPE html html head meta charsetUTF-8 title自定义帖子管理/title link relstylesheet href/static/layui/css/layui.css/link link relstylesheet href/static/css/css.css/link /head bodydiv stylepadding: 20pxspan classlayui-breadcrumba首页/aacite自定义帖子管理/cite/a/spandiv stylepadding-top: 20px;divdivbutton classlayui-btn layuiadmin-btn-list data-typebatchdel onclickaddPost()添加/button/div/divdivtable width100% idpostListTable /table/div/div /divscript src/static/layui/layui.js/script script src/static/js/jquery.js/script script src/static/js/common.js/script script typetext/javascriptlayui.use([element,form,table], function(){var formlayui.form;var element layui.element; //导航的hover效果、二级菜单等功能需要依赖element模块$ layui.jquery; // 使用jquerytable layui.table;table.render({elem: #postListTable,url:/admin/post/list,cols: [[{type:checkbox},{field:id, width:100,title: 编号},{field:title, title: 自定义帖子名称},{field:action, width:300, title: 操作,align:center,templet:formatAction}]],page: true});});function deleteOne(id){layer.confirm(您确定要删除这条记录吗, {title:系统提示,btn: [确定,取消] //按钮}, function(){layer.closeAll(dialog);$.post(/admin/post/delete,{id:id},function(result){if(result.success){layer.msg(删除成功);table.reload(postListTable,{});}else{layer.msg(删除失败请联系管理员);}},json);}, function(){});}function addPost(){layer.open({type: 2,title: 添加自定义帖子,area: [1000px, 730px],content: /admin/savePost.html //iframe的url});}function modifyPost(id){layer.open({type: 2,title: 修改自定义帖子,area: [1000px, 730px],content: /admin/savePost.html?idid //iframe的url});}function formatAction(d){return a classlayui-btn layui-btn-danger layui-btn-xs target_blank href/post/d.idi classlayui-icon layui-icon-read/i帖子预览/abutton classlayui-btn layui-btn-normal layui-btn-xs onclickmodifyPost(d.id)i classlayui-icon layui-icon-edit/i编辑/buttonbutton classlayui-btn layui-btn-warm layui-btn-xs onclickdeleteOne(d.id)i classlayui-icon layui-icon-delete /i删除/button;}/script /body /html再新建一个savePost.html !DOCTYPE html html head meta charsetUTF-8 title添加或者修改自定义帖子/title link relstylesheet href/static/layui/css/layui.css/link style typetext/csstable tr td{padding: 10px;}/style /head body div stylepadding: 20pxform methodposttabletrtd标题/tdtdinput typetext autocompleteoff idtitle nametitle classlayui-input stylewidth: 360px//td/trtrtd valigntop内容/tdtdtextarea typetext classckeditor idcontent namecontent classlayui-input /textarea/td/trtrtdbutton classlayui-btn onclicksubmitData();return false;提交/button/tdtdfont iderrorInfo colorred/font/td/tr/table/form /div script src/static/ckeditor/ckeditor.js/script script src/static/layui/layui.js/script script src/static/js/jquery.js/script script src/static/js/common.js/script script typetext/javascriptlayui.use([form], function(){});function submitData(){var title$(#title).val().trim();var contentCKEDITOR.instances.content.getData();if(title) {$(#errorInfo).text(请输入自定义帖子标题);$(#name).focus();return false;}if(content) {$(#errorInfo).text(请输入自定义帖子内容);$(#url).focus();return false;}var idgetQueryVariable(id);if(id){$.post(/admin/post/save,{id:id,title:title,content:content},function(result){if(result.success){layer.alert(修改成功,function () {parent.reloadPage();});}else{$(#errorInfo).text(result.errorInfo);}},json);}else{$.post(/admin/post/save,{title:title,content:content},function(result){if(result.success){layer.alert(添加成功,function () {parent.reloadPage();});}else{$(#errorInfo).text(result.errorInfo);}},json);}}function getQueryVariable(variable){var query window.location.search.substring(1);var vars query.split();for (var i0;ivars.length;i) {var pair vars[i].split();if(pair[0] variable){return pair[1];}}return(false);}$(function(){var idgetQueryVariable(id);if(id){$.post(/admin/post/findById,{id:id},function(result){if(result.success){var postresult.post;$(#title).val(post.title);CKEDITOR.instances.content.setData(post.content);}else{layer.alert(服务器加载有问题请联系管理员);}},json);}});/script /body /html自定义帖子详情查看 新建PostController类 package com.python222.controller;import com.python222.entity.Post; import com.python222.service.PostService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView;/*** 自定义帖子控制器* author python222小锋老师* site www.python222.com*/ Controller RequestMapping(/post) public class PostController {Autowiredprivate PostService postService;/*** 根据id查询自定义帖子详细信息* param id* return* throws Exception*/RequestMapping(/{id})public ModelAndView view(PathVariable(id)Integer id)throws Exception{ModelAndView mavnew ModelAndView();Post post postService.getById(id);mav.setViewName(post);mav.addObject(post,post);return mav;}} 前端新建模板post.html !DOCTYPE html html xmlns:thhttp://www.thymeleaf.org head meta http-equivContent-Type contenttext/html; charsetutf-8 / title th:text${post.title}-${application.propertyMap[k1]}/title meta namekeywords th:content${post.title} meta namedescription th:content${post.title} link href/systemImages/favicon.ico relSHORTCUT ICON link relstylesheet href/static/layui/css/layui.css/ link relstylesheet href/static/css/css.css/ link relstylesheet typetext/css href/static/css/normalize.css / link relstylesheet href/static/css/font-awesome.min.css/head bodydiv classheader_top th:includecommon/head::#h /div classheader th:includecommon/menu::#m /div classmain_wrapperdiv classw1220 article_contentdiv classtitle th:text${post.title}/divdiv classcontent th:utext${post.content}/div/div/divdiv classfooter th:includecommon/footer::#f //body /html
http://www.pierceye.com/news/130714/

相关文章:

  • 上海网站建设网站营销推广费计入什么科目
  • 云南培训网站建设网站建设的公司太多了
  • 洛阳网站建设招聘信息ppt设计师兼职
  • 建工网官方网站电子商务网站设计岗位主要是
  • 保险网站建设平台青岛设计公司排名
  • 伊利网站建设评价做的最好的宠物网站
  • 沈阳的网站制作公司哪家好常用设计资源网站
  • 做网站需要什么技术文化传媒公司 网站备案
  • 郑州市建设厅网站html5 网站开发定制
  • 网站制作网站建站公司用wordpress
  • 做资讯网站盈利措美网站建设
  • 山东建设工程执业证书查询网站建网是什么
  • 大型服装网站建设wordpress留言板模版
  • 延安做网站沈阳学网站制作学校
  • 网站添加新闻网站免费正能量软件不良
  • asp c 网站开发互动网门户网站建设
  • 图书馆网站结构怎么做国外超酷设计网站
  • 网站开发软件搭配学室内设计去哪好
  • 南通营销网站制作河南省大型项目建设办公室网站
  • 黄山网站建设怎么做seo快速优化技术
  • 百度有做企业网站吗ppt设计主题怎么设置
  • 网页设计与网站开发pdf网站个人建设
  • ip138禁止查询该域名商务网站建设组成包括网站优化
  • 百度做网站续费费用seo分析工具有哪些
  • 威胁网站检测平台建设郑州seo服务
  • 怎么设立网站赚广告费合肥新站区有做网站的吗
  • 管理系统 网站模板网站建立不安全
  • 模板网站的域名是什么意思百度教育智能小程序
  • 哪里有做配音的兼职网站wordpress菜单图标特效
  • 怎样自创广告网站海南网站建设推广公司哪家好