2.4发版前更新
前端分离出来 工具列表新增版本控制
This commit is contained in:
101
html/admin/magbox/Banner.html
Normal file
101
html/admin/magbox/Banner.html
Normal file
@@ -0,0 +1,101 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Banner设置</title>
|
||||
</head>
|
||||
<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>
|
||||
<body>
|
||||
<table id="banner" lay-filter="banner"></table>
|
||||
</body>
|
||||
<script type="text/html" id="bar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="url">URL</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="click">点击地址</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="state">上/下线</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.use('table', function() {
|
||||
var table = layui.table;
|
||||
table.render({
|
||||
elem: '#banner',
|
||||
height: 312,
|
||||
url: '/android/banner/get.do?all=true',
|
||||
page: false,
|
||||
response: {
|
||||
statusCode: 100
|
||||
},
|
||||
cols: [
|
||||
[{
|
||||
field: 'id',
|
||||
title: 'id',
|
||||
width: 80,
|
||||
sort: true,
|
||||
fixed: 'left'
|
||||
}, {
|
||||
field: 'url',
|
||||
title: '图片链接',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
field: 'click',
|
||||
title: '跳转地址',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
field: 'isshow',
|
||||
title: '是否显示',
|
||||
width: 120,
|
||||
}, {
|
||||
fixed: 'right',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
toolbar: '#bar'
|
||||
}
|
||||
]
|
||||
]
|
||||
})
|
||||
table.on('tool(banner)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'url') {
|
||||
layer.prompt(function(value, index, elem) {
|
||||
layer.close(index);
|
||||
layer.msg(value)
|
||||
active['reload'](this)
|
||||
});
|
||||
} else if (obj.event === 'click') {
|
||||
layer.prompt(function(value, index, elem) {
|
||||
layer.close(index);
|
||||
layer.msg(value)
|
||||
active['reload'](this)
|
||||
});
|
||||
} else if (obj.event == 'state') {
|
||||
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>
|
||||
58
html/admin/magbox/Countdown.html
Normal file
58
html/admin/magbox/Countdown.html
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>盒子倒计时设置</title>
|
||||
</head>
|
||||
<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>
|
||||
<body>
|
||||
<form class="layui-form" action="" style="width: 60%;">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开始时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="button" id="start" required lay-verify="required" placeholder="开始时间" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">结束时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="button" id="end" required lay-verify="required" placeholder="结束时间" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-left: 85%;">
|
||||
<input id="subbutton" type="button" value="提交" class="layui-btn" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
<script>
|
||||
layui.use('laydate', function() {
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
|
||||
laydate.render({
|
||||
elem: '#start' ,
|
||||
type:'datetime',
|
||||
min:0
|
||||
});
|
||||
laydate.render({
|
||||
elem:'#end',
|
||||
type:'datetime',
|
||||
min:0
|
||||
})
|
||||
});
|
||||
$('#subbutton').click(function(event){
|
||||
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
96
html/admin/magbox/magic.html
Normal file
96
html/admin/magbox/magic.html
Normal file
@@ -0,0 +1,96 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>魔改列表设置</title>
|
||||
</head>
|
||||
<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>
|
||||
<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>
|
||||
112
html/admin/magbox/popularize.html
Normal file
112
html/admin/magbox/popularize.html
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>推广设置</title>
|
||||
</head>
|
||||
<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>
|
||||
<body>
|
||||
<table id="banner" lay-filter="banner"></table>
|
||||
</body>
|
||||
<script type="text/html" id="bar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="title">标题</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="url">URL</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="click">点击地址</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="state">上/下线</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.use('table', function() {
|
||||
var table = layui.table;
|
||||
table.render({
|
||||
elem: '#banner',
|
||||
height: 312,
|
||||
url: '/android/config/home.do?all=true',
|
||||
page: false,
|
||||
response: {
|
||||
statusCode: 100
|
||||
},
|
||||
cols: [
|
||||
[{
|
||||
field: 'id',
|
||||
title: 'id',
|
||||
width: 80,
|
||||
sort: true,
|
||||
fixed: 'left'
|
||||
}, {
|
||||
field: 'text',
|
||||
title: '标题',
|
||||
width: 120,
|
||||
}, {
|
||||
field: 'imageurl',
|
||||
title: '图片链接',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
field: 'click',
|
||||
title: '跳转地址',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
field: 'isshow',
|
||||
title: '是否显示',
|
||||
width: 120,
|
||||
}, {
|
||||
fixed: 'right',
|
||||
width: 250,
|
||||
align: 'center',
|
||||
toolbar: '#bar'
|
||||
}
|
||||
]
|
||||
]
|
||||
})
|
||||
table.on('tool(banner)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'title') {
|
||||
layer.prompt(function(value, index, elem) {
|
||||
layer.close(index);
|
||||
layer.msg(value)
|
||||
active['reload'](this)
|
||||
});
|
||||
} else if (obj.event === 'url') {
|
||||
layer.prompt(function(value, index, elem) {
|
||||
layer.close(index);
|
||||
layer.msg(value)
|
||||
active['reload'](this)
|
||||
});
|
||||
} else if (obj.event === 'click') {
|
||||
layer.prompt(function(value, index, elem) {
|
||||
layer.close(index);
|
||||
layer.msg(value)
|
||||
active['reload'](this)
|
||||
});
|
||||
} else if (obj.event == 'state') {
|
||||
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>
|
||||
34
html/admin/magbox/tools.html
Normal file
34
html/admin/magbox/tools.html
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<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>
|
||||
<body>
|
||||
<input type="button" value="上传" class="layui-btn image" id="file" lay-data="{url:'/utlis/upload.do',accept:'file'}"/>
|
||||
</body>
|
||||
<script>
|
||||
layui.use('upload', function(){
|
||||
var upload = layui.upload;
|
||||
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#file' //绑定元素
|
||||
,url: '/utlis/upload.do' //上传接口
|
||||
,done: function(res){
|
||||
//上传完毕回调
|
||||
alert(res)
|
||||
}
|
||||
,error: function(){
|
||||
//请求异常回调
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user