diff --git a/WebContent/WEB-INF/jsp/pc/activity/activityEdit.jsp b/WebContent/WEB-INF/jsp/pc/activity/activityEdit.jsp index 06c4940..3ac85bf 100644 --- a/WebContent/WEB-INF/jsp/pc/activity/activityEdit.jsp +++ b/WebContent/WEB-INF/jsp/pc/activity/activityEdit.jsp @@ -1,4 +1,5 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> @@ -6,243 +7,203 @@ - 活动介绍编辑 + 文章编辑 - - - - -
-
- -
- + + + +
+
+ +
+ +
+
不超过20个汉字
-
不超过20个汉字
-
-
- -
- +
+ +
+ +
-
-
- - -
- +
+ +
+ + +
-
- +
+ +
+ +
-
- -
提示:可以在地图上点击位置获取坐标(鼠标滚动放大缩小地图)
-
-
- - -
-
- - - - - - - + + + + + }) + \ No newline at end of file diff --git a/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp b/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp index 6c714c2..225d41c 100644 --- a/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp +++ b/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp @@ -6,88 +6,54 @@ - 活动介绍列表 + 文章列表 + -
- +
- - - - - - - + + + + + + + + + + - +
No项目名称经度纬度海报模板id更新时间操作No文章主图文章标题文章副标题商家名称商家地址商家电话是否首页显示操作
暂无数据
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
-
- + @@ -98,41 +64,18 @@ laydate = layui.laydate, layer = layui.layer, laypage = layui.laypage; - var page = 1; - var keyword = ""; - //查询 - form.on('submit(querybtn)', function(data) { - var keyword = $("input[name=keyword]").val(); - Initdata(page, keyword) - }); - $(".resetBtn").on("click", function() { - $("input[name=keyword]").val(""); - Initdata(page, keyword) - }) - //初始化数据 - Initdata(page, keyword); - function Initdata(page, keyword) { + var queryObj = { + page: 1, + size: 10, + sellerId: 0 + }; - $.post("/zzhnc/project/getProjectList", { - page: page, - keyword: keyword - }, function(data) { + function initData(queryObj) { + $.get("/zzhnc/goods/search", queryObj, function(data) { data = data.data; console.log(data) - laypage({ - cont: 'page', - pages: data.totalPages, //总页数 - curr: page, - skip: true, - jump: function(obj, first) { - if(!first) { - page = obj.curr - Initdata(page, keyword); - } - } - }); var str = ""; if(data.rows.length < 1) { $(".nodata").show(); @@ -141,62 +84,98 @@ for(var i = 0; i < data.rows.length; i++) { str += '' + '' + ((data.page - 1) * data.pageSize + i + 1) + '' + - '' + data.rows[i].name + '' + - '' + data.rows[i].lng + '' + - '' + data.rows[i].lat + '' + - '' + data.rows[i].postertempletid + '' + - '' + toTime_G(data.rows[i].updatedtime) + '' + - '' + - '修改' + - '删除' + + '' + + '' + data.rows[i].name + '' + + '' + data.rows[i].description + '' + + '' + data.rows[i].primePrice + '' + + '' + data.rows[i].sellerAddress + '' + + '' + data.rows[i].sellerPhone + '' + + '' + ' ' + + '修改' + + '删除' + '' + ''; } } $("#tablelist").html(str); + toNull_G(); + form.render(); + + laypage.render({ + elem: 'page', + count: data.totalPages, + curr: queryObj.page, + jump: function(obj, first) { + if(!first) { + queryObj.page = obj.curr + initData(queryObj); + } + } + }); }) } - //添加项目 + //初始化数据 + initData(queryObj); + + //查询 + form.on('submit(querybtn)', function(data) { + queryObj.keyword = $("[name=keyword]").val(); + queryObj.page = 1; + initData(queryObj) + }); + + //重置 + $(".resetBtn").on("click", function() { + $("[name=keyword]").val(""); + queryObj.page = 1; + queryObj.sellerId = 0; + initData(queryObj) + return false + }) + + //添加文章 $(document).on("click", ".createBtn", function() { - if(parent.tab.exists("添加项目") > 0) { - var tabid = parent.tab.getTabId("添加项目"); + if(parent.tab.exists("添加文章") > 0) { + var tabid = parent.tab.getTabId("添加文章"); parent.tab.deleteTab(tabid); } parent.tab.tabAdd({ - href: "/zzhnc/project/projectEdit?id=0", + href: "/zzhnc/activity/activityEdit?id=0", icon: "fa-cubes", - title: "添加项目" + title: "添加文章" }); }) - //修改项目 + + //修改文章 $(document).on("click", ".updataBtn", function() { var id = $(this).parents("tr").attr("data-id"); - if(parent.tab.exists("修改项目") > 0) { - var tabid = parent.tab.getTabId("修改项目"); + if(parent.tab.exists("修改文章") > 0) { + var tabid = parent.tab.getTabId("修改文章"); parent.tab.deleteTab(tabid); } parent.tab.tabAdd({ - href: "/zzhnc/project/projectEdit?id=" + id, + href: "/zzhnc/activity/activityEdit?id=" + id, icon: "fa-cubes", - title: "修改项目" + title: "修改文章" }); }) - //删除项目 + + //删除文章 $(document).on("click", ".deleteBtn", function() { var id = $(this).parents("tr").attr("data-id"); - layer.confirm('您确定要删除该项目吗?', { - btn: ['确定', '取消'] //按钮 + layer.confirm('您确定要删除该文章吗?', { + btn: ['确定', '取消'] }, function(index, layero) { - $.post("/zzhnc/project/deleteProject", { + $.post("/zzhnc/goods/delete", { id: id }, function(data) { console.log(data) if(data.code == 0) { top.layer.msg("删除成功"); - Initdata(1, keyword) + initData(queryObj); layer.close(index); } else { top.layer.msg(data.msg); diff --git a/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp b/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp index ce02925..85f880c 100644 --- a/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp +++ b/WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp @@ -83,7 +83,7 @@ //页面初始化 function initdata(queryObj) { - $.post("/zzhnc/autoreply/getAutoreplyList", queryObj, function(data) { + $.get("/zzhnc/autoreply/getAutoreplyList", queryObj, function(data) { data = data.data; console.log(data) @@ -98,8 +98,8 @@ '' + data.rows[i].keywords + '' + '' + data.rows[i].contents + '' + '' + - '修改' + - '删除' + + '修改' + + '删除' + '' + ''; } @@ -244,7 +244,7 @@ form.render(); }, success: function(){ - $.post("/zzhnc/autoreply/getAutoReply", { + $.get("/zzhnc/autoreply/getAutoReply", { id: id }, function(data) { console.log(data) diff --git a/WebContent/WEB-INF/jsp/pc/goods/goodsEdit.jsp b/WebContent/WEB-INF/jsp/pc/goods/goodsEdit.jsp index 3811e9b..736be0e 100644 --- a/WebContent/WEB-INF/jsp/pc/goods/goodsEdit.jsp +++ b/WebContent/WEB-INF/jsp/pc/goods/goodsEdit.jsp @@ -23,7 +23,8 @@ #container { margin-left: 20px; } - .bannerUrl{ + + .bannerUrl { width: 200px; height: 200px; } @@ -34,14 +35,14 @@
- +
不超过20个汉字
- +
@@ -54,56 +55,67 @@
- +
- +
- +
+ +
+ +
+ +
+ +
+
- +
- +
- +
-
+ -
-
- -
- - +
--> +
+ +
+ + +
+ - - - \ No newline at end of file diff --git a/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp b/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp index 6b441ab..2942db8 100644 --- a/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp +++ b/WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp @@ -10,13 +10,14 @@ +
- +
@@ -40,12 +41,14 @@ + + - +
No现价 商家名称 商家地址商家电话是否首页显示 操作
暂无数据
@@ -69,12 +72,12 @@ size: 10, sellerId: 0 }; - + function initData(queryObj) { $.get("/zzhnc/goods/search", queryObj, function(data) { data = data.data; console.log(data) - + var str = ""; if(data.rows.length < 1) { $(".nodata").show(); @@ -90,20 +93,23 @@ '' + data.rows[i].price + '' + '' + data.rows[i].sellerName + '' + '' + data.rows[i].sellerAddress + '' + - '' + - '修改' + - '删除' + + '' + data.rows[i].sellerPhone + '' + + '' + ' ' + + '修改' + + '删除' + '' + ''; } } $("#tablelist").html(str); + toNull_G(); - + form.render(); + laypage.render({ elem: 'page', - count: data.totalPages, + count: data.totalPages, curr: queryObj.page, jump: function(obj, first) { if(!first) { @@ -124,7 +130,7 @@ queryObj.page = 1; initData(queryObj) }); - + //重置 $(".resetBtn").on("click", function() { $("[name=keyword]").val(""); @@ -141,12 +147,12 @@ parent.tab.deleteTab(tabid); } parent.tab.tabAdd({ - href: "/zzhnc/goods/goodsEdit", + href: "/zzhnc/goods/goodsEdit?id=0", icon: "fa-cubes", title: "添加商品" }); }) - + //修改商品 $(document).on("click", ".updataBtn", function() { var id = $(this).parents("tr").attr("data-id"); @@ -160,12 +166,12 @@ title: "修改商品" }); }) - + //删除商品 $(document).on("click", ".deleteBtn", function() { var id = $(this).parents("tr").attr("data-id"); layer.confirm('您确定要删除该爆款商品吗?', { - btn: ['确定', '取消'] + btn: ['确定', '取消'] }, function(index, layero) { $.post("/zzhnc/goods/delete", { id: id diff --git a/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp b/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp index 77ab6f2..d8a3b1f 100644 --- a/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp +++ b/WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp @@ -382,7 +382,7 @@ top.layer.msg(data.msg); } }) - + form.on('submit(submit)', function(e) { var lop = e.field.lotteryPercent; e.field.lotteryPercent = lop; @@ -481,10 +481,4 @@ } - - - - - - \ No newline at end of file