This repository has been archived on 2022-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
magic_box_server/html/admin/magbox/magic.html

97 lines
2.1 KiB
HTML
Raw Normal View History

2020-01-10 17:59:09 +08:00
2020-01-02 02:10:13 +08:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>魔改列表设置</title>
</head>
2020-01-10 17:59:09 +08:00
<link rel="stylesheet" href="/static/layui/css/layui.css">
<script src="/static/layui/layui.all.js"></script>
<script src="/static/layui/layui.js"></script>
<script src="/static/js/jquery-3.2.1.js"></script>
<script src="/static/js/user.js"></script>
2020-01-02 02:10:13 +08:00
<body>
<input id="add" type="button" data-type="reload" value="新增" class="layui-btn"" />
<table id="banner" lay-filter="banner"></table>
</body>
<script type="text/html" id="bar">
<a class="layui-btn layui-btn-xs" lay-event="config">修改</a>
</script>
<script>
layui.use('table', function() {
var table = layui.table;
table.render({
elem: '#banner',
height: 312,
url: '/android/config/mg.do?all=true',
page: false,
response: {
statusCode: 100
},
cols: [
[{
field: 'id',
title: 'id',
width: 80,
sort: true,
fixed: 'left'
}, {
field: 'indexs',
title: '顺位',
width: 80,
sort: true,
}, {
field: 'name',
title: '标题',
width: 80,
},{
field:'mgType',
title:'配置代码',
width:100
},{
field: 'icon',
title: '图像地址',
width: 300,
},
{
field: 'isshow',
title: '是否显示',
width: 120,
}, {
fixed: 'right',
width: 80,
align: 'center',
toolbar: '#bar'
}
]
]
})
table.on('tool(banner)', function(obj) {
var data = obj.data;
if (obj.event === 'config') {
layer.prompt(function(value, index, elem) {
layer.close(index);
layer.msg(value)
active['reload'](this)
});
}
})
var $ = layui.$,
active = {
reload: function() {
//执行重载
table.reload('banner', {
page: {
curr: 1 //重新从第 1 页开始
},
where: {
type: $('#searchType').val(),
key: $('#searchKey').val()
}
});
}
};
})
</script>
</html>