Helius
2021-06-16 5728be2af515b2200e782aa201ca5d4d67d9ea47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!--#layout("/common/layout.html",{"jsBase":"/js/admin/setting/banner/"}){ -->
 
<div>
    <div class="layui-form-item" style="margin-top: 20px">
        <button type="button" id="add" class="layui-btn layui-btn-primary">添加</button>
    </div>
</div>
<table id="bannerTable" lay-filter="bannerTable"></table>
<!--#} -->
<script>
    var index;
    layui.use(['index'], function(){
        index = layui.index;
        index.init({});
    });
 
    var delBanner= function (id, e) {
        layer.confirm('确认要删除吗?', {
            btn : [ '确定', '取消' ]//按钮
        }, function(index) {
            layer.close(index);
            $.post(Common.ctxPath+'/admin/setting/banner/delBanner.json', {'id':id}, function (data) {
                if(data == 0){
                    Common.info("删除失败");
                }else {
                    Common.info("删除成功");
                    $("tr[data-index='" + e + "']").remove();
                }
            });
        });
    }
 
    var updateBanner = function (data, e) {
        var p = 'id='+data.id+"&picName="+data.picName+"&picPath="+data.picPath+"&picUrl="+data.picUrl
                +'&sort='+data.sort+'&delFlag='+data.delFlag+'&createTime='+data.createTime;
        Common.openDlg("/admin/setting/banner/edit.do?"+p,"banner管理>>更新");
    }
 
 
</script>
<!--C端用户管理----用户查询-->