| | |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'shopInfoUpdate') { |
| | | febs.modal.open('编辑', 'modules/news/shopInfoUpdate/' + data.id, { |
| | | febs.modal.open('编辑', 'modules/shop/update/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#newsInfo-update').find('#submit').trigger('click'); |
| | | $('#shop-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | |
| | | }); |
| | | |
| | | function delShopInfo(id) { |
| | | febs.get(ctx + 'admin/news/delShopInfo/' + id, null, function () { |
| | | febs.get(ctx + 'admin/shop/del/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | |
| | | febs.modal.open('新增', 'modules/shop/add/', { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#newsInfo-add').find('#submit').trigger('click'); |
| | | $('#shop-add').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | |
| | | cols: [[ |
| | | {field: 'shopImage', title: '店铺图片', |
| | | templet: function (d) { |
| | | return '<a lay-event="seeImgThumb"><img id="seeImgThumb'+d.id+'" src="'+d.thumb+'" alt=""></a>'; |
| | | return '<a lay-event="seeImgThumb"><img id="seeImgThumb'+d.id+'" src="'+d.shopImage+'" alt=""></a>'; |
| | | }, minWidth: 150,align:'center'}, |
| | | {field: 'shopName', title: '店铺名称', minWidth: 120,align:'center'}, |
| | | {field: 'phone', title: '联系方式', minWidth: 120,align:'center'}, |
| | |
| | | } |
| | | |
| | | form.on('switch(isTopSwitch)', function (data) { |
| | | console.log(data.value); |
| | | if (data.elem.checked) { |
| | | febs.post(ctx + 'admin/news/topNews/' + data.value, null, function () { |
| | | febs.post(ctx + 'admin/shop/upOrDown/' + data.value + '/' + 1, null, function () { |
| | | febs.alert.success('设置成功'); |
| | | $query.click(); |
| | | }); |
| | | } else { |
| | | febs.post(ctx + 'admin/news/unTopNews/' + data.value, null, function () { |
| | | febs.post(ctx + 'admin/shop/upOrDown/' + data.value + '/' + 2, null, function () { |
| | | febs.alert.success('设置成功'); |
| | | $query.click(); |
| | | }); |