From b4f2219ce06b1b1d3fe4631090b58fd9f9a7824d Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 22 Sep 2021 17:48:22 +0800 Subject: [PATCH] Merge branch 'master' of http://120.27.238.55:7000/r/xc-mall --- src/main/resources/templates/febs/views/modules/goods/goodsList.html | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsList.html b/src/main/resources/templates/febs/views/modules/goods/goodsList.html index 6ccd99b..8798741 100644 --- a/src/main/resources/templates/febs/views/modules/goods/goodsList.html +++ b/src/main/resources/templates/febs/views/modules/goods/goodsList.html @@ -73,11 +73,16 @@ } if (layEvent === 'upGoods') { febs.modal.confirm('上架', '确认上架该商品?', function () { - downGoods(data.id); + upGoods(data.id); }); } - if (layEvent === 'see') { - febs.modal.open( '个人信息', 'modules/mallMember/detail/' + data.id, { + if (layEvent === 'delGoods') { + febs.modal.confirm('删除', '确认删除该商品?', function () { + delGoods(data.id); + }); + } + if (layEvent === 'detailGoods') { + febs.modal.open( '商品详情', 'modules/goods/detailGoods/' + data.id, { maxmin: true, }); } @@ -88,15 +93,18 @@ $query.click(); }); } - - + function delGoods(id) { + febs.get(ctx + 'admin/goods/delMallGoods/' + id, null, function () { + febs.alert.success('删除成功'); + $query.click(); + }); + } function upGoods(id) { febs.get(ctx + 'admin/goods/upMallGoods/' + id, null, function () { febs.alert.success('上架成功'); $query.click(); }); } - // 查询按钮 $query.on('click', function () { @@ -147,8 +155,11 @@ templet: function (d) { if (d.isSale === 1) { return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="downGoods" shiro:hasPermission="user:update">下架</button>' + + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detailGoods" shiro:hasPermission="user:update">详情</button>' }else{ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="upGoods" shiro:hasPermission="user:update">上架</button>' + + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="delGoods" shiro:hasPermission="user:update">删除</button>' + + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="updateGoods" shiro:hasPermission="user:update">编辑</button>' } },minWidth: 300,align:'center'} @@ -159,7 +170,7 @@ // 获取查询参数 function getQueryParams() { return { - name: $searchForm.find('input[name="goodsName"]').val().trim(), + goodsName: $searchForm.find('input[name="goodsName"]').val().trim(), }; } -- Gitblit v1.9.1