2.4发版前更新
前端分离出来 工具列表新增版本控制
1
html/1.txt
Normal file
@@ -0,0 +1 @@
|
||||
123
|
||||
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
@@ -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
@@ -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
@@ -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
@@ -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>
|
||||
164
html/admin/system/userlist.html
Normal file
@@ -0,0 +1,164 @@
|
||||
|
||||
|
||||
<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="#">
|
||||
<blockquote class="layui-elem-quote">用户列表</blockquote>
|
||||
<div class="layui-input-inline">
|
||||
<select id="searchType" lay-verify="" style="width: 20px;">
|
||||
<option value="uid">UID</option>
|
||||
<option value="name">账号</option>
|
||||
<option value="uname">用户名</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input id='searchKey' type="text" class="layui-input" placeholder="请输入关键字" />
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input id="searchKeyButton" type="button" data-type="reload" value="搜索" class="layui-btn" onclick="search()" />
|
||||
</div>
|
||||
<table id="user" lay-filter="user" >
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
<script type="text/html" id="bar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="repw">重置密码</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="unben">解封</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="ben">封禁</a>
|
||||
</script>
|
||||
<script>
|
||||
var table
|
||||
var table_;
|
||||
layui.use('table', function() {
|
||||
table = layui.table;
|
||||
table_ = table.render({
|
||||
elem: '#user',
|
||||
height: 312,
|
||||
url: '/admin/user/list.do', //数据接口
|
||||
height: '500' ,
|
||||
page: true //开启分页
|
||||
,
|
||||
cols: [
|
||||
[ //表头
|
||||
{
|
||||
field: 'uid',
|
||||
title: 'UID',
|
||||
width: 80,
|
||||
sort: true,
|
||||
fixed: 'left'
|
||||
}, {
|
||||
field: 'name',
|
||||
title: '账号',
|
||||
width: 120,
|
||||
sort: true
|
||||
}, {
|
||||
field: 'uname',
|
||||
title: '用户名',
|
||||
width: 120,
|
||||
}, {
|
||||
field: 'benTime',
|
||||
title: '封禁时间',
|
||||
width: 160,
|
||||
}, {
|
||||
field: 'unBenTime',
|
||||
title: '解封时间',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
field: 'benIndex',
|
||||
title: '封禁次数',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
fixed: 'right',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
toolbar: '#bar'
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
table.on('tool(user)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'repw') {
|
||||
layer.open({
|
||||
title: "提示",
|
||||
content: "将为该账号发送重置密码邮件",
|
||||
yes: function(index, layero) {
|
||||
layer.close(index);
|
||||
$.post("/user/repassword.do?uid=" + data.uid, function(data) {
|
||||
var json = JSON.parse(data);
|
||||
layer.alert(json.msg);
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (obj.event === 'ben') {
|
||||
layer.open({
|
||||
title: "设置禁言时间",
|
||||
content: '<input type="button" class="layui-input" id="bendata" value="设置封禁时间">',
|
||||
success:function(layero,index){
|
||||
var laydate = layui.laydate;
|
||||
//执行一个laydate实例
|
||||
laydate.render({
|
||||
elem: '#bendata' ,//指定元素
|
||||
type:'datetime',
|
||||
value: new Date() ,
|
||||
});
|
||||
},
|
||||
yes:function(index,obj){
|
||||
layer.close(index);
|
||||
$.post("/admin/user/ben.do?uid="+data.uid+"&time="+$('#bendata').val(),function(data){
|
||||
var json=JSON.parse(data);
|
||||
layer.msg(json.msg);
|
||||
active['reload'](this)
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (obj.event === 'unben') {
|
||||
$.post("/admin/user/unben.do?uid="+data.uid,function(data){
|
||||
var json=JSON.parse(data);
|
||||
layer.msg(json.msg);
|
||||
active['reload'](this)
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
var $ = layui.$,
|
||||
active = {
|
||||
reload: function() {
|
||||
//执行重载
|
||||
table.reload('user', {
|
||||
page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
},
|
||||
where: {
|
||||
type: $('#searchType').val(),
|
||||
key: $('#searchKey').val()
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function search() {
|
||||
active['reload'](this)
|
||||
}
|
||||
|
||||
function getData(obj) {
|
||||
var laydate = layui.laydate;
|
||||
|
||||
}
|
||||
layui.use('laydate', function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
19
html/apphtml/user.html
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
<html>
|
||||
<link rel="stylesheet" href="../static/layui/css/layui.css">
|
||||
<script src="../static/layui/layui.js"></script>
|
||||
<script src="../static/js/jquery-3.2.1.js"></script>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>倒计时设置</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
layui.use("element", function() {
|
||||
var element=layui.element;
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
191
html/home.html
Normal file
@@ -0,0 +1,191 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>个人中心</title>
|
||||
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="/static/layui/css/modules/layer/default/layer.css">
|
||||
<script src="../static/layui/layui.js"></script>
|
||||
<script src="../static/layui/lay/modules/layer.js"></script>
|
||||
<script src="../static/js/jquery-3.2.1.js"></script>
|
||||
<script src="../static/js/user.js"></script>
|
||||
</head>
|
||||
<body class="layui-layout-body">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div class="layui-header">
|
||||
<div class="layui-logo" id="title">魔改宝盒</div>
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item"><a href="">我的</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">消息管理</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item">
|
||||
<a href="#">
|
||||
<img id="ic_user" src="http://t.cn/RCzsdCq" class="layui-nav-img">
|
||||
<font id="uname">用户名</font>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd id="userData"><a href="javascript:;">基本资料</a></dd>
|
||||
<dd id="security"><a href="javascript:;">安全设置</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item"><a href="javascript:logout();">注销</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="layui-side layui-bg-black">
|
||||
<div class="layui-side-scroll">
|
||||
<ul class="layui-nav layui-nav-tree">
|
||||
<li class="layui-nav-item layui-this" id='main'><a href="javascript:;">主页</a></li>
|
||||
<li class="layui-nav-item">
|
||||
<a class="" href="#">盒子中心</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd id='mymod'><a href="javascript:;">我的盒子</a></dd>
|
||||
<dd id='upmod'><a href="javascript:;">上传器</a></dd>
|
||||
<dd><a href="javascript:;">别人的盒子</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">数据中心</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">我的数据</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item" id="hezi" name="hezi">
|
||||
<a href="javascript:;">管理盒子</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd id="countdown"><a href="javascript:;">倒计时设置</a></dd>
|
||||
<dd id="banner"><a href="javascript:;">Banner</a></dd>
|
||||
<dd><a href="javascript:;">推广</a></dd>
|
||||
<dd><a href="javascript:;">工具</a></dd>
|
||||
<dd><a href="javascript:;">魔改</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item" id="system" name="system">
|
||||
<a href="javascript:;">用户管理</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd id='users'><a href="javascript:;">用户列表</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item" id='permission'><a href="javascript:;">权限申请</a></li>
|
||||
<li class="layui-nav-item" id='problem'><a href="javascript:;">提供建议/反馈BUG</a></li>
|
||||
<li class="layui-nav-item" id='join'><a href="javascript:;">加入我们</a></li>
|
||||
<li class="layui-nav-item" id='about'><a href="javascript:;">关于我们</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-body">
|
||||
<div style="padding: 15px;">
|
||||
<iframe src="html/main.html" id='context' frameborder="0" onload="changeFrameHeight()"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-footer">
|
||||
©2019 <a href="http://jianrmod.cn">jianrmod.cn</a> - 舰R魔改宝盒小组
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//JavaScript代码区域
|
||||
layui.use('element', function() {
|
||||
var element = layui.element;
|
||||
|
||||
});
|
||||
$('#security').click(function(event) {
|
||||
layer.open({
|
||||
title: "重置密码",
|
||||
content: "将发送重置密码邮件到您的邮箱",
|
||||
yes: function(index, event) {
|
||||
layer.close(index);
|
||||
$.post("/user/repassword.do", function(data) {
|
||||
var json = JSON.parse(data);
|
||||
layer.alert(json.msg);
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
$('#banner').click(function(event) {
|
||||
$(document).attr('title', "Banner管理");
|
||||
$('#context').attr('src', '/admin/magbox/Banner.html');
|
||||
})
|
||||
$('#countdown').click(function(event) {
|
||||
$(document).attr('title', "倒计时管理");
|
||||
$('#context').attr('src', '/admin/magbox/Countdown.html');
|
||||
})
|
||||
$('#users').click(function(event) {
|
||||
$(document).attr('title', '用户列表');
|
||||
$('#context').attr('src', "admin/system/userlist.html");
|
||||
})
|
||||
$('#title').click(function(event) {
|
||||
$(document).attr('title', '个人中心');
|
||||
window.location.href = "home.html"
|
||||
})
|
||||
$('#main').click(function(event) {
|
||||
$(document).attr('title', '个人中心');
|
||||
$('#context').attr('src', '/html/main.html');
|
||||
})
|
||||
$('#join').click(function(event) {
|
||||
$(document).attr('title', '加入我们');
|
||||
$('#context').attr('src', '/html/join.html');
|
||||
})
|
||||
$('#about').click(function(event) {
|
||||
$(document).attr('title', '关于我们');
|
||||
$('#context').attr('src', '/html/about.html');
|
||||
})
|
||||
$('#upmod').click(function(event) {
|
||||
$(document).attr('title', '魔改上传器');
|
||||
$('#context').attr('src', '/html/upmod.html');
|
||||
})
|
||||
$('#mymod').click(function(event) {
|
||||
$(document).attr('title', '我的魔改');
|
||||
$('#context').attr('src', '/html/mymod.html');
|
||||
})
|
||||
$('#userData').click(function(event) {
|
||||
$(document).attr('title', '基本资料');
|
||||
$('#context').attr('src', '/html/userData.html');
|
||||
})
|
||||
$('#permission').click(function(event) {
|
||||
$(document).attr('title', '申请权限');
|
||||
$('#context').attr('src', '/html/permission.html');
|
||||
})
|
||||
$.post("/user/udata.do", function(data, textStatus, req) {
|
||||
var json = JSON.parse(data);
|
||||
console.log(data)
|
||||
$('#uname').text(json.data.user.uname);
|
||||
$('#ic_user').attr("src", json.data.userdata.image)
|
||||
try {
|
||||
|
||||
var pw =json.data.user.power;
|
||||
if (pw == '') {
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
if (json.data.user.power < pw) {
|
||||
$('#hezi').hide();
|
||||
$('#system').hide();
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
location.reload();
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
function changeFrameHeight() {
|
||||
var ifm = document.getElementById("context");
|
||||
ifm.height = document.documentElement.clientHeight;
|
||||
ifm.width = document.documentElement.clientWidth;
|
||||
}
|
||||
window.onresize = function() {
|
||||
changeFrameHeight();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
16
html/html/about.html
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
<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>
|
||||
咕咕咕?
|
||||
</body>
|
||||
</html>
|
||||
71
html/html/head.html
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<ul class="layui-nav">
|
||||
<li class="layui-nav-item layui-this"><a href="/home.html">首页</a></li>
|
||||
<li class="layui-nav-item"><a href="">上传器</a></li>
|
||||
<li class="layui-nav-item"><a href="">我的数据</a></li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">功能</a>
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
<dd><a href="">魔改</a></dd>
|
||||
<dd><a href="">统计</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item"><a href="">社区</a></li>
|
||||
<li class="layui-nav-item">
|
||||
<a href=""><img src="http://t.cn/RCzsdCq" class="layui-nav-img">我</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">修改信息</a></dd>
|
||||
<dd><a href="javascript:;">安全管理</a></dd>
|
||||
<dd><a href="javascript:;">退了</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
<link rel="stylesheet" href="../static/layui/css/layui.css">
|
||||
<script type="text/javascript" src="../static/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery-3.2.1.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
|
||||
|
||||
<script>
|
||||
layui.use('element', function(){
|
||||
var element = layui.element;
|
||||
var session=$.session.get('session');
|
||||
console.log('sid:'+session);
|
||||
$.post("/user/test.do", {session:session}, function(data, textStatus, req) {
|
||||
var json=null;
|
||||
console.log("测试登陆状态:"+data);
|
||||
try {
|
||||
json=JSON.parse(data);
|
||||
} catch (e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
if(json==null||json.code!="0100"){
|
||||
var layer = layui.layer;
|
||||
layer.open({
|
||||
title: "请登录",
|
||||
content: "还没登陆哦~",
|
||||
cancel:function(index){
|
||||
return false;
|
||||
},
|
||||
btn: ['知道了'],
|
||||
btn1: function(data){
|
||||
window.location.replace("/index.html");
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
console.log("获取用户数据")
|
||||
$.post("/user/udata.do",function(data, textStatus, req){
|
||||
console.log("udata:"+data);
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
32
html/html/join.html
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
|
||||
<html>
|
||||
<link rel="stylesheet" href="../static/layui/css/layui.css">
|
||||
<script src="../static/layui/layui.js"></script>
|
||||
<script src="../static/js/jquery-3.2.1.js"></script>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>听说这里面有福利</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<a href="#" class="layui-btn layui-btn-disabled">加入1群(未满)</a>
|
||||
<p>
|
||||
<a href="#" class="layui-btn layui-btn-disabled">加入2群(已满)</a>
|
||||
<p>
|
||||
<a href="#" class="layui-btn layui-btn-disabled">加入3群(已满)</a>
|
||||
<p>
|
||||
<a href="#" class="layui-btn layui-btn-disabled">加入4群(已满)</a>
|
||||
<p>
|
||||
<a href="#" class="layui-btn layui-btn-disabled">加入5群(已满)</a>
|
||||
<p>
|
||||
<a href="#" class="layui-btn layui-btn-disabled">加入6群(已满)</a>
|
||||
<p>
|
||||
<a href="#" class="layui-btn layui-btn-disabled">加入7群(已满)</a>
|
||||
<p>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=5IvmNp4" class="layui-btn layui-btn-normal" target="_blank">加入8群(未满)</a>
|
||||
<p>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=5U1aUqK" class="layui-btn layui-btn-normal" target="_blank">加入审核群(MOD制作、wiki、同人等交流)</a>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
24
html/html/main.html
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<blockquote class="layui-elem-quote">欢迎来到魔改宝盒中心</blockquote>
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h3 class="layui-timeline-title">1月30日</h3>
|
||||
<p>
|
||||
盒子中心全新上线,app2.0 测试版发布! <i class="layui-icon"></i>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
||||
<script src="../static/layui/layui.js"></script>
|
||||
</html>
|
||||
78
html/html/mymod.html
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
|
||||
<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">
|
||||
<link rel="stylesheet" href="../static/css/ui.css">
|
||||
<script src="../static/layui/layui.js"></script>
|
||||
<script src="../static/layui/lay/modules/upload.js"></script>
|
||||
<script src="../static/js/jquery-3.2.1.js"></script>
|
||||
<script src="../static/js/user.js"></script>
|
||||
|
||||
<body>
|
||||
<ul class="flow-default" id="mod">
|
||||
</ul>
|
||||
</body>
|
||||
<style>
|
||||
li {
|
||||
list-style: none;
|
||||
display: inline-block; //使li对象显示为一行
|
||||
margin-left: 50px;
|
||||
margin-top: 5%;
|
||||
width: 30%;
|
||||
height: 20%;
|
||||
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
layui.use('flow', function() {
|
||||
var flow = layui.flow;
|
||||
flow.load({
|
||||
elem: '#mod',
|
||||
done: function(page, next) {
|
||||
//模拟数据插入
|
||||
var lis = [];
|
||||
$.post('/mod/user.do', function(data) {
|
||||
var json = JSON.parse(data);
|
||||
|
||||
if (json.code == 100) {
|
||||
for (var i = 0; i < json.data.length; i++) {
|
||||
lis.push(
|
||||
'<li><div class="item"><img alt="" src="../'+json.data[i].icon+'" style="width: 100%"><br><h2>'+json.data[i].title+'</h2><p>'+json.data[i].overview+'</p><p class="by">@'+json.data[i].byuser+'</p></div></li>');
|
||||
}
|
||||
}
|
||||
next(lis.join(''), page<0);
|
||||
})
|
||||
|
||||
/* setTimeout(function() {
|
||||
var lis = [];
|
||||
for (var i = 0; i < 8; i++) {
|
||||
lis.push(
|
||||
'<li><div class="item"><img alt="" src="https://img01.vgtime.com/game/cover/2019/01/15/190115161410549.jpg" style="width: 100%"><br><h2>标题' +
|
||||
((page - 1) * 8 + i + 1) + '</h2><p>正文' + ((page - 1) * 8 + i + 1) + '</p><p class="by">@作者' + ((page -
|
||||
1) * 8 + i + 1) + '</p></div></li>');
|
||||
}
|
||||
|
||||
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
|
||||
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
|
||||
next(lis.join(''), page < 10); //假设总页数为 10
|
||||
}, 500); */
|
||||
}
|
||||
});
|
||||
});
|
||||
layui.use('layer', function() {
|
||||
var layer = layui.layer;
|
||||
|
||||
/* layer.open({
|
||||
title: '提示'
|
||||
,content: '当前模块仍在开发中'
|
||||
,yes: function(index, layero){
|
||||
window.location.replace("/html/main.html");
|
||||
}
|
||||
}); */
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
76
html/html/permission.html
Normal file
@@ -0,0 +1,76 @@
|
||||
|
||||
|
||||
<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>
|
||||
<table id="power" lay-filter="power">
|
||||
|
||||
</table>
|
||||
</body>
|
||||
<script type="text/html" id="bar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="apply">申请</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.use('table', function() {
|
||||
var table = layui.table;
|
||||
table.render({
|
||||
elem: '#power',
|
||||
height: 312,
|
||||
url: '/permission/getGroup.do' //数据接口
|
||||
,
|
||||
page: true //开启分页
|
||||
,
|
||||
cols: [
|
||||
[ //表头
|
||||
{
|
||||
field: 'permission',
|
||||
title: '权限',
|
||||
width: 100,
|
||||
sort: true,
|
||||
fixed: 'left'
|
||||
}, {
|
||||
field: 'state',
|
||||
title: '状态',
|
||||
width: 80
|
||||
}, {
|
||||
field: 'info',
|
||||
title: '权限说明',
|
||||
width: 450,
|
||||
sort: true
|
||||
}, {
|
||||
fixed: 'right',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
toolbar: '#bar'
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
table.on('tool(power)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'apply') {
|
||||
layer.open({
|
||||
title:"申请权限",
|
||||
content:"将为您申请 "+data.permission+" 权限",
|
||||
yes:function(index,layero){
|
||||
layer.close(index);
|
||||
$.post("/permission/apply.do?permission="+data.id,function(data){
|
||||
var json=JSON.parse(data);
|
||||
layer.alert(json.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
63
html/html/resetPassword.html
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
|
||||
<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>
|
||||
<ul class="layui-nav" lay-filter="">
|
||||
<li class="layui-nav-item"><a href="http://www.jianrmod.cn">首页</a></li>
|
||||
<li class="layui-nav-item"><a href="http://jianr.jianrmod.cn/">用户中心</a></li>
|
||||
<li class="layui-nav-item"><a href="http://bbs.jianrmod.cn/">论坛</a></li>
|
||||
</ul>
|
||||
<div class="layui-anim layui-anim-scaleSpring">
|
||||
<div class="layui-container" style="
|
||||
margin-top: 10%;
|
||||
margin-left: 35%;
|
||||
width: 50%">
|
||||
<form class="layui-form layui-form-pane" style="width: 50%;">
|
||||
<div class="layui-row">
|
||||
<div><label class="layui-form-label">新密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" id="password" required lay-verify="required" placeholder="请输入新密码" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div><label class="layui-form-label">重复密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" id="repassword" required lay-verify="required" placeholder="请再输入一次新密码" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 10%">
|
||||
<div class="layui-input-block">
|
||||
<input type="button" class="layui-btn" lay-submit lay-filter="formDemo" onclick="login()" value="提交" style="margin-left: 80%;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
function login() {
|
||||
var pwrod = $('#password').val();
|
||||
var repwrod = $('#repassword').val();
|
||||
if (pwrod != repwrod) {
|
||||
layer.msg("密码不一致")
|
||||
} else if(pwrod !=""){
|
||||
$.post('/user/resetPassword.do?password='+pwrod, function(data) {
|
||||
var json=JSON.parse(data);
|
||||
layer.msg(json.msg)
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
22
html/html/test.html
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
<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>
|
||||
咕咕咕?
|
||||
<iframe id="officeContent" src="" width=0 height=0 frameborder=0></iframe>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#officeContent').attr("src","/test.do");
|
||||
|
||||
</script>
|
||||
</html>
|
||||
41
html/html/up.html
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
<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>
|
||||
<blockquote class="layui-elem-quote">魔改宝盒隐私权政策</blockquote>
|
||||
APP权限说明
|
||||
<hr class="layui-bg-blue">
|
||||
<p>魔改宝盒(以下简称为盒子)非常注重保护用户隐私。当您使用盒子配套APP时,会收集以下涉及隐私权限:</p>
|
||||
<p>1:显示在其他应用上面<br>应用内含悬浮窗功能,悬浮窗提供实时数据查询工具</p>
|
||||
|
||||
<p>2:修改或删除您的SD卡中的内容<br>图片缓存、资源下载保存在SD卡中</p>
|
||||
|
||||
<p>3:访问确切位置信息(使用 GPS 和网络进行定位)<br>友盟统计所需要(著名第三方统计工具)</p>
|
||||
|
||||
<p>4:访问大致位置信息(使用网络进行定位)<br>友盟统计所需要(著名第三方统计工具)</p>
|
||||
|
||||
<p>5:读取您的SD卡中的内容<br>读取应用内下载的数据资料</p>
|
||||
|
||||
<p>6:获取设备识别码和状态<br>仅获取IMEI,友盟统计所需要</p>
|
||||
<br/>
|
||||
应用隐私说明
|
||||
<hr class="layui-bg-orange">
|
||||
<p>关于IMEI:收集imei是因为友盟统计需要用于统计数据所使用,关于友盟隐私说明可参考:<a href="https://www.umeng.com/policy?spm=a211g2.211692.0.0.28961a0bdvjM3f">这个链接</a></p>
|
||||
<p>如需使用盒子魔改功能,则需要ROOT权限,我们在此说明,获取root权限仅为替换游戏资源所使用,并不会用于其他任何不相关的功能!</p>
|
||||
<p>关于收集游戏数据功能:</p>
|
||||
<p>1、我们通过配套专用客户端所采集到的游戏数据不会用于任何非授权行为(如出售、非不可抗力泄露等)</p>
|
||||
<p>2、盒子采集到的数据将仅用于本地数据分析并展示给用户所使用,不会进行非用户授权自主上传以外的数据回报</p>
|
||||
<p>3、盒子不会收集用户的游戏账号信息,仅收集战斗数据资料(战斗详情以及掉落物)</p>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</html>
|
||||
378
html/html/upmod.html
Normal file
@@ -0,0 +1,378 @@
|
||||
|
||||
|
||||
<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.js"></script>
|
||||
<script src="../static/layui/lay/modules/upload.js"></script>
|
||||
<script src="../static/js/jquery-3.2.1.js"></script>
|
||||
<script src="../static/js/user.js"></script>
|
||||
<body>
|
||||
<blockquote class="layui-elem-quote">
|
||||
请严格填写每个选项!
|
||||
<p>提交mod后不会立刻显示在盒子中,需要管理员审核后才会显示
|
||||
<p>审核结果将在您的信息中心中显示
|
||||
</blockquote>
|
||||
<form class="layui-form" style="height: 100%">
|
||||
<div class="layui-form-item">
|
||||
<input id='path' value="#" style="display: none;" name='path'>
|
||||
<label class="layui-form-label" name='modName'>Mod名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" required lay-verify="required"
|
||||
placeholder="请输入MOD标题" autocomplete="off" class="layui-input "
|
||||
style="width: 30%;" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">创作类型</label>
|
||||
<div class="layui-input-block" style="width: 28%;">
|
||||
<select name="city" lay-verify="required" >
|
||||
<option value="0">转载</option>
|
||||
<option value="1">原创</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">适配版本</label>
|
||||
<div class="layui-input-block" style="width: 28%;">
|
||||
<select name="gameverid" lay-verify="required" id='_gameVersion'>
|
||||
<option value=''></option>
|
||||
</select>
|
||||
<div class="layui-form-mid layui-word-aux">游戏更新后请及时更新哦~</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">上传用户</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="byUser" required lay-verify="required"
|
||||
placeholder="作者名" autocomplete="off" class="layui-input "
|
||||
style="width: 30%;" value="" disabled="disabled" id="_byUser">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">mod类型</label>
|
||||
<div class="layui-input-block" style="width: 28%;">
|
||||
<select name="modtype" lay-verify="required" id='_modlist'>
|
||||
<option value=''></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">舰娘类型</label>
|
||||
<div class="layui-input-block" style="width: 28%;">
|
||||
<select name="jianrtype" lay-verify="required" id='_jianlist'>
|
||||
<option value=''></option>
|
||||
<option value='0'>[非舰娘]</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">默认安装位置</label>
|
||||
<div class="layui-input-block" style="width: 28%;">
|
||||
<select name="installPath" lay-verify="required" id='_installPath'>
|
||||
<option value=''></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">TAG</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="tag" required lay-verify="required"
|
||||
placeholder="用;号分隔(中英文分号均可)" autocomplete="off" class="layui-input "
|
||||
style="width: 30%;" value="">
|
||||
<div class="layui-form-mid layui-word-aux">方便统计和用户下载搜索,以及上推荐</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">舰娘ID</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="jianr_id" required lay-verify="required"
|
||||
placeholder="舰娘数字ID,第一位数是0的话可不填0" autocomplete="off" class="layui-input "
|
||||
style="width: 30%;" value="999">
|
||||
<div class="layui-form-mid layui-word-aux">不知道ID?<a href="#">点我查询</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">关联其他MOD</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="remod" name="remod" value="0" class="layui-input" style="width: 10%; display: none;"/>
|
||||
<a id="remodSelect" href="javascript:;" class="layui-btn layui-btn-normal">选择您的MOD</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">MOD简介</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="overview" required lay-verify="required"
|
||||
placeholder="80字内简单介绍" autocomplete="off" class="layui-input "
|
||||
style="width: 30%;" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">详细介绍</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="info" required lay-verify="required" placeholder="在这里来介绍你的作品吧" class="layui-textarea" style="width: 30%;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<label class="layui-form-label">提交图标</label>
|
||||
<input type="text" name="icon_" style="display: none;"/>
|
||||
<button type="button" class="layui-btn icon" name='icon' lay-data="{url:'/mod/upload/icon.do',accept:'images'}">
|
||||
<i class="layui-icon"></i>上传图片
|
||||
</button>
|
||||
<img alt="" src="" id="icon" style="width: 150px"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<label class="layui-form-label">提交截图</label>
|
||||
<button type="button" class="layui-btn image" name='images' lay-data="{url:'/mod/upload/image.do',accept:'images'}">
|
||||
<i class="layui-icon"></i>上传图片
|
||||
</button>
|
||||
<img alt="" src="" id="image" style="width: 150px"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<label class="layui-form-label">提交MOD</label>
|
||||
<button type="button" class="layui-btn file" name='files' lay-data="{url:'/mod/upload/files.do',accept:'file'}">
|
||||
<i class="layui-icon"></i>上传文件
|
||||
</button>
|
||||
<table class="layui-table" id='files_list' style="width: 50%">
|
||||
<colgroup>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>文件名</th>
|
||||
<th>文件大小</th>
|
||||
<th>状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
var installPath="";
|
||||
var fileArray=eval("[]");
|
||||
var updateFlag=0;
|
||||
|
||||
$('#path').attr('value', new Date().getTime());
|
||||
function setFilePath(file) {
|
||||
var index=-1;
|
||||
index=layer.open({
|
||||
title: '设置文件安装路径'
|
||||
,content: '文件:'+file+' 想安装到:<br>'+'<select name="installPath" lay-verify="required" id=\'_path\'>'+installPath+'</select>'
|
||||
,yes:function(index,layero){
|
||||
for(var i=0;i<fileArray.length;i++){
|
||||
if(fileArray[i].url.indexOf(file)>=0){
|
||||
console.log("原路径:"+ fileArray[i].path);
|
||||
fileArray[i].path=$('#_path').val();
|
||||
break;
|
||||
}
|
||||
}
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
layui.use('form', function(){
|
||||
var form = layui.form;
|
||||
var upload=layui.upload;
|
||||
$.post("/user/udata.do",function(data, textStatus, req){
|
||||
var json=JSON.parse(data);
|
||||
console.log("加载用户数据")
|
||||
$("#_byUser").attr("value", json.data.user.uname);
|
||||
$('#tmp').html("准备");
|
||||
})
|
||||
$.post("/mod/jiantype.do", function(data, textStatus, req) {
|
||||
var list=JSON.parse(data);
|
||||
$('#_jianlist').append("<option value=''></option>");
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
$('#_jianlist').append("<option value='"+JSON.parse(list[i]).id+"'>"+JSON.parse(list[i]).name+"</option>");
|
||||
}
|
||||
form.render();
|
||||
})
|
||||
$.post("/mod/modtype.do", function(data, textStatus, req) {
|
||||
var list=JSON.parse(data);
|
||||
$('#_modlist').append("<option value=''></option>");
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
$('#_modlist').append("<option value='"+JSON.parse(list[i]).id+"'>"+JSON.parse(list[i]).name+"</option>");
|
||||
}
|
||||
form.render();
|
||||
})
|
||||
$.post("/mod/installPath.do", function(data, textStatus, req) {
|
||||
var list=JSON.parse(data);
|
||||
$('#_modlist').append("<option value=''></option>");
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
installPath+="<option value='"+JSON.parse(list[i]).id+"'>"+JSON.parse(list[i]).name+"</option>";
|
||||
}
|
||||
$('#_installPath').append(installPath);
|
||||
form.render();
|
||||
})
|
||||
$.post("/mod/getGameVerList.do",function(data,textStatus,req){
|
||||
console.log("游戏版本:"+data)
|
||||
var list=JSON.parse(data);
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
$('#_gameVersion').append("<option value='"+list[i].id+"'>"+list[i].gameversion+"</option>");
|
||||
}
|
||||
form.render();
|
||||
})
|
||||
//监听提交
|
||||
form.on('submit(formSubmit)', function(data){
|
||||
console.log("files="+JSON.stringify(fileArray));
|
||||
if(updateFlag!=0){
|
||||
layer.open({
|
||||
title:'提示'
|
||||
,content:'当前正在上传文件,请等完成后再提交'
|
||||
});
|
||||
}else{
|
||||
$.post("/mod/upload/upload.do?json="+JSON.stringify(data.field)+"&files="+JSON.stringify(fileArray),function(data,status,req){
|
||||
var json=JSON.parse(data);
|
||||
|
||||
layer.open({
|
||||
title:"上传结果",
|
||||
content:json.msg,
|
||||
btn:['确定'],
|
||||
btn1:function(index){
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
//上传监听
|
||||
upload.render({
|
||||
elem: '.icon',
|
||||
multiple:true,
|
||||
field:'icon',
|
||||
data:{'path':$('#path').val()},
|
||||
before:function(obj){
|
||||
|
||||
obj.preview(function(index,file,result){
|
||||
console.log(file);
|
||||
$('#files_list').append("<tr><td>"+file.name+"</td><td>"+Math.round(file.size/1024)+"Kb</td><td id='icon_src'>上传中</td></tr>");
|
||||
});
|
||||
},
|
||||
done: function(res, index, upload){
|
||||
console.log(res);
|
||||
$('#icon').attr('src',res.url);
|
||||
$('#icon_').attr('value',res.url);
|
||||
$('#icon_src').html("上传成功");
|
||||
},
|
||||
error:function(res,index,upload){
|
||||
|
||||
}
|
||||
});
|
||||
upload.render({
|
||||
elem: '.image',
|
||||
multiple:true,
|
||||
field:'image',
|
||||
data:{'path':$('#path').val()},
|
||||
before:function(obj){
|
||||
obj.preview(function(index,file,result){
|
||||
console.log(file);
|
||||
$('#files_list').append("<tr><td>"+file.name+"</td><td>"+Math.round(file.size/1024)+"Kb</td><td id='image_src'>上传中</td></tr>");
|
||||
});
|
||||
form.render();
|
||||
|
||||
},
|
||||
done: function(res, index, upload){
|
||||
$('#image').attr('src',res.url);
|
||||
$('#image_src').html("上传成功");
|
||||
},
|
||||
error:function(res,index,upload){
|
||||
|
||||
}
|
||||
})
|
||||
upload.render({
|
||||
elem: '.file',
|
||||
multiple:true,
|
||||
field:'file',
|
||||
data:{'path':$('#path').val()},
|
||||
before:function(obj){
|
||||
obj.preview(function(index,file,result){
|
||||
console.log('上传文件:'+file.name.replace(".", ""));
|
||||
updateFlag=1;
|
||||
$('#files_list').append("<tr><td>"+file.name+"</td><td>"+Math.round(file.size/1024)+"Kb</td><td id='"+index+"'>上传中</td></tr>");
|
||||
});
|
||||
},
|
||||
done: function(res, index, upload){
|
||||
|
||||
console.log("文件URL:"+res.url);
|
||||
$('#'+index).html("上传成功 <a href='javascript:;' onclick='setFilePath(\""+res.name+"\");' style='color: blue;'>设置本文件的安装位置</a>");
|
||||
var json={
|
||||
"url":res.url,
|
||||
"path":"",
|
||||
"name":res.name
|
||||
}
|
||||
fileArray.push(json)
|
||||
},
|
||||
allDone:function(obj){
|
||||
updateFlag=0;
|
||||
},
|
||||
error:function(res,index,upload){
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
$(function(){
|
||||
$("td").click(function(){ //td点击事件;
|
||||
var val = $(this).attr("id") //定义val值为点击的此td的id值;
|
||||
console.log(val);
|
||||
})
|
||||
})
|
||||
$("#remodSelect").click(function(event) {
|
||||
$.post("/user/mods.do", function(data, textStatus, req) {
|
||||
var tmp="<option value='0'>不关联</option>";
|
||||
var json=JSON.parse(data);
|
||||
var array="[]";
|
||||
if(json.code==100){
|
||||
array=json.data;
|
||||
}
|
||||
for(var i=0;i<array.length;i++){
|
||||
tmp+="<option value='"+array[i].id+"'>"+array[i].title+"</option>";
|
||||
}
|
||||
layer.open({
|
||||
title: '选择'
|
||||
,content: '请选择要关联的MOD:<p><select id=\'_remod\' lay-verify="required" name="_remod" style="width: 100%;">'+tmp+'</select>'
|
||||
,yes: function(index,layero){
|
||||
if($("#_remod").val()==0){
|
||||
$("#remodSelect").text("选择您的MOD");
|
||||
$("#remod").val("0");
|
||||
}else{
|
||||
$("#remodSelect").text("已关联:"+$("#_remod").find(":selected").html()+"(id="+$("#_remod").val()+")");
|
||||
$("#remod").val($("#_remod").val());
|
||||
}
|
||||
layer.closeAll();
|
||||
}
|
||||
});
|
||||
|
||||
console.log(array.length);
|
||||
|
||||
}
|
||||
)
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
102
html/html/userData.html
Normal file
@@ -0,0 +1,102 @@
|
||||
|
||||
|
||||
<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.js"></script>
|
||||
<script src="../layui/lay/modules/upload.js"></script>
|
||||
<script src="../static/js/jquery-3.2.1.js"></script>
|
||||
<script src="../static/js/user.js"></script>
|
||||
<body class="layui-layout-body">
|
||||
<form class="layui-form" action="#">
|
||||
<div class="layui-row">
|
||||
<div class="layui-form-item">
|
||||
<label class=" layui-form-label">用户昵称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" style="width: 40%;" id="uname" name="uname"
|
||||
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="text" style="width:40%;" id="email" name="email" placeholder="请输入邮箱"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<label class="layui-form-label">头像</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="button" class="layui-btn" id="upload_sub" style="width: 30%;">
|
||||
<i class="layui-icon"></i>上传图片
|
||||
</button>
|
||||
<div class="layui-upload-list" style="margin-left: 30%;">
|
||||
<img class="layui-upload-img" id="upload_img" src="" style="width: 20%; height: 20%;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<label class="layui-form-label"></label>
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<button style="width: 20%;" class="layui-btn" lay-submit lay-filter="formSubmit">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
<script>
|
||||
layui.use('form', function() {
|
||||
var form=layui.form;
|
||||
var upload = layui.upload;
|
||||
upload.render({
|
||||
elem: '#upload_sub',
|
||||
url: '/user/updata_image.do', //必填项
|
||||
field:'image',
|
||||
done: function(res, index, upload){
|
||||
if(res.url==''){
|
||||
layer.open({
|
||||
title:"错误",
|
||||
content:"图片上传失败,请重试",
|
||||
btn:['确定'],
|
||||
btn1:function(index){
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$('#upload_img').attr("src", res.url)
|
||||
}
|
||||
},
|
||||
});
|
||||
form.on('submit(formSubmit)',function(data){
|
||||
|
||||
$.post("/user/updateUserData.do?email="+$('#email').val()+"&uname="+$('#uname').val(),function(data){
|
||||
var json = JSON.parse(data)
|
||||
layer.open({
|
||||
title:"上传结果",
|
||||
content:json.msg,
|
||||
btn:['确定'],
|
||||
btn1:function(index){
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
$.post("/user/udata.do", function(data, textStatus, req) {
|
||||
var json = JSON.parse(data)
|
||||
$('#upload_img').attr("src", json.data.userdata.image)
|
||||
$('#uname').attr("value",json.data.user.uname);
|
||||
$('#email').attr("value",json.data.userdata.email);
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
127
html/index.html
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>首页</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-scaleSpring">
|
||||
<div class="layui-container">
|
||||
<div class="layui-row" style="margin-top: 255px;">
|
||||
<div class="layui-col-xs4 layui-col-sm12 layui-col-md4">
|
||||
<form class="layui-form layui-form-pane">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="uname" required lay-verify="required"
|
||||
placeholder="请输入账号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<label class="layui-form-label" style="margin-top: 10px">密码</label>
|
||||
<div class="layui-input-block" style="margin-top: 10px">
|
||||
<input type="password" id="pass" required lay-verify="required"
|
||||
placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 10px">
|
||||
<div class="layui-input-block">
|
||||
<input type="button" class="layui-btn" lay-submit lay-filter="formDemo" onclick="login()" value="登录"/>
|
||||
<input type="button" class="layui-btn layui-btn-primary" onclick="reg()" value="注册"/>
|
||||
<input type="button" class="layui-btn layui-btn-primary" onclick="getpassword()" value="忘记密码"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<link rel="stylesheet" href="../static/layui/css/layui.css">
|
||||
<script type="text/javascript" src="../static/layui/layui.all.js"></script>
|
||||
<script type="text/javascript" src="../static/js/jquery-3.2.1.js"></script>
|
||||
<script type="text/javascript">
|
||||
var layer = layui.layer;
|
||||
function reg() {
|
||||
layui.use('layer', function(){
|
||||
layer.open({
|
||||
title: '用户注册'
|
||||
,content: '<input type="text" id="regUname" required lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input">'
|
||||
+'<input type="text" id="uuname" required lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input" style="margin-top: 10px">'
|
||||
+'<input type="password" id="regPass" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input" style="margin-top: 10px">'
|
||||
+'<input type="password" id="repass" required lay-verify="required" placeholder="请再输入一次密码" autocomplete="off" class="layui-input" style="margin-top: 10px">'
|
||||
+'<a href="#" style="color: #0000FF">阅读用户协议</a>'
|
||||
,btn: ['提交','取消']
|
||||
,btn1:function(index,layero){
|
||||
var uname=$('#regUname').val();
|
||||
var pass=$('#regPass').val();
|
||||
var repass=$('#repass').val();
|
||||
var uuname=$('#uuname').val();
|
||||
if(pass!=repass){
|
||||
alert('两次密码不一致');
|
||||
return;
|
||||
}
|
||||
$.post('/user/reg.do', {uname:uuname,pass:pass,name:uname}, function(data) {
|
||||
layer.open({
|
||||
title:"注册成功",
|
||||
content:"欢迎您注册,请尽早填写邮箱",
|
||||
yes:function(index,obj){
|
||||
layer.close(index);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
,btn2:function(index){
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function login() {
|
||||
var name=$('#uname').val();
|
||||
var pass=$('#pass').val();
|
||||
console.log("name:"+name+" pass:"+pass);
|
||||
$.post('/user/login.do',{uname:name,pass:pass},function(data){
|
||||
console.log(data);
|
||||
var json=JSON.parse(data);
|
||||
if(json.code==102){
|
||||
layer.open({
|
||||
title: '还没注册?',
|
||||
content:'似乎你还没注册呢,先注册吧',
|
||||
btn:['现在注册','下次吧'],
|
||||
btn1:function(index){
|
||||
reg();
|
||||
},
|
||||
btn2: function(index){
|
||||
|
||||
}
|
||||
})
|
||||
}else if(json.code==100){
|
||||
window.location.replace('home.html');
|
||||
}else {
|
||||
layer.open({
|
||||
title: '错误',
|
||||
content:json.msg,
|
||||
btn:['确定'],
|
||||
btn1:function(index){
|
||||
layer.close(index);
|
||||
},
|
||||
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
function getpassword(){
|
||||
layer.open({
|
||||
title:"找回密码",
|
||||
content:"请输入账号<p><input type='text' id='uname_' required lay-verify='required' placeholder='请输入账号' autocomplete='off' class='layui-input'>",
|
||||
yes:function(index,obj){
|
||||
var uname=$('#uname_').val();
|
||||
$.post("/user/repassword.do?name=" + uname, function(data) {
|
||||
var json = JSON.parse(data);
|
||||
layer.alert(json.msg);
|
||||
})
|
||||
layer.close(index)
|
||||
layer.msg("正在提交")
|
||||
},
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
7
html/static/css/ui.css
Normal file
@@ -0,0 +1,7 @@
|
||||
div.item{
|
||||
border: 2px solid #ccc!important;padding:24px;border-radius: 25px!important; width: 50%;
|
||||
box-shadow: 2px 2px 1px gray;
|
||||
}
|
||||
p.by{
|
||||
color: gray;
|
||||
}}
|
||||
10253
html/static/js/jquery-3.2.1.js
vendored
Normal file
74
html/static/js/user.js
Normal file
@@ -0,0 +1,74 @@
|
||||
window.onload=function(){
|
||||
$.post("/user/test.do", '', function(data, textStatus, req) {
|
||||
var json=null;
|
||||
console.log("登陆测试:"+data);
|
||||
try {
|
||||
json=JSON.parse(data);
|
||||
} catch (e) {
|
||||
// TODO: handle exception
|
||||
console.log(e);
|
||||
}
|
||||
if(json==null||json.code!=100){
|
||||
var title;
|
||||
var content;
|
||||
var url;
|
||||
var reload=false;
|
||||
switch (json.code) {
|
||||
case 104:
|
||||
title="请登录";
|
||||
content="还没登陆哦~";
|
||||
url="/index.html"
|
||||
break;
|
||||
case 105:
|
||||
title="没有访问权限";
|
||||
content="您无法访问当前页面";
|
||||
url="home.html"
|
||||
reload=true;
|
||||
break;
|
||||
default:
|
||||
title="异常错误";
|
||||
content="未知错误,请尝试重新登录";
|
||||
url="/index.html"
|
||||
break;
|
||||
}
|
||||
var layer = layui.layer;
|
||||
layer.open({
|
||||
title: title,
|
||||
content: content,
|
||||
cancel:function(index){
|
||||
return false;
|
||||
},
|
||||
btn: ['知道了'],
|
||||
btn1: function(data){
|
||||
if(reload)
|
||||
window.history.go(-1);
|
||||
else
|
||||
window.location.replace(url);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
console.log('登陆成功');
|
||||
}
|
||||
})
|
||||
$.post("/user/udata.do",function(data, textStatus, req){
|
||||
var json=JSON.parse(data);
|
||||
$("#uname").text(json.uname);
|
||||
})
|
||||
}
|
||||
function logout(){
|
||||
$.post("/user/logout.do", function(data, textStatus, req) {
|
||||
var layer=layui.layer;
|
||||
layer.open({
|
||||
title: "退出",
|
||||
content: "成功退出,欢迎下次光临",
|
||||
cancel:function(index){
|
||||
return false;
|
||||
},
|
||||
btn:['了解'],
|
||||
btn1:function(){
|
||||
window.location.replace("/index.html");
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
2
html/static/layui/css/layui.css
Normal file
2
html/static/layui/css/layui.mobile.css
Normal file
2
html/static/layui/css/modules/code.css
Normal file
@@ -0,0 +1,2 @@
|
||||
/** layui-v2.4.5 MIT License By https://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
||||
BIN
html/static/layui/css/modules/layer/default/icon-ext.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
html/static/layui/css/modules/layer/default/icon.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
2
html/static/layui/css/modules/layer/default/layer.css
Normal file
BIN
html/static/layui/css/modules/layer/default/loading-0.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
html/static/layui/css/modules/layer/default/loading-1.gif
Normal file
|
After Width: | Height: | Size: 701 B |
BIN
html/static/layui/css/modules/layer/default/loading-2.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
html/static/layui/font/iconfont.eot
Normal file
473
html/static/layui/font/iconfont.svg
Normal file
|
After Width: | Height: | Size: 274 KiB |
BIN
html/static/layui/font/iconfont.ttf
Normal file
BIN
html/static/layui/font/iconfont.woff
Normal file
BIN
html/static/layui/images/face/0.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
html/static/layui/images/face/1.gif
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
html/static/layui/images/face/10.gif
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
html/static/layui/images/face/11.gif
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
html/static/layui/images/face/12.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
html/static/layui/images/face/13.gif
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
html/static/layui/images/face/14.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
html/static/layui/images/face/15.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
html/static/layui/images/face/16.gif
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
html/static/layui/images/face/17.gif
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
html/static/layui/images/face/18.gif
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
html/static/layui/images/face/19.gif
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
html/static/layui/images/face/2.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
html/static/layui/images/face/20.gif
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
html/static/layui/images/face/21.gif
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
html/static/layui/images/face/22.gif
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
html/static/layui/images/face/23.gif
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
html/static/layui/images/face/24.gif
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
html/static/layui/images/face/25.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
html/static/layui/images/face/26.gif
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
html/static/layui/images/face/27.gif
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
html/static/layui/images/face/28.gif
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
html/static/layui/images/face/29.gif
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
html/static/layui/images/face/3.gif
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
html/static/layui/images/face/30.gif
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
html/static/layui/images/face/31.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
html/static/layui/images/face/32.gif
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
html/static/layui/images/face/33.gif
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
html/static/layui/images/face/34.gif
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
html/static/layui/images/face/35.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
html/static/layui/images/face/36.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
html/static/layui/images/face/37.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
html/static/layui/images/face/38.gif
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
html/static/layui/images/face/39.gif
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
html/static/layui/images/face/4.gif
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
html/static/layui/images/face/40.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
html/static/layui/images/face/41.gif
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
html/static/layui/images/face/42.gif
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
html/static/layui/images/face/43.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
html/static/layui/images/face/44.gif
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
html/static/layui/images/face/45.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
html/static/layui/images/face/46.gif
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
html/static/layui/images/face/47.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
html/static/layui/images/face/48.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
html/static/layui/images/face/49.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
html/static/layui/images/face/5.gif
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
html/static/layui/images/face/50.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
html/static/layui/images/face/51.gif
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
html/static/layui/images/face/52.gif
Normal file
|
After Width: | Height: | Size: 777 B |
BIN
html/static/layui/images/face/53.gif
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
html/static/layui/images/face/54.gif
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
html/static/layui/images/face/55.gif
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
html/static/layui/images/face/56.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
html/static/layui/images/face/57.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
html/static/layui/images/face/58.gif
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
html/static/layui/images/face/59.gif
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
html/static/layui/images/face/6.gif
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
html/static/layui/images/face/60.gif
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
html/static/layui/images/face/61.gif
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
html/static/layui/images/face/62.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
html/static/layui/images/face/63.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
html/static/layui/images/face/64.gif
Normal file
|
After Width: | Height: | Size: 6.3 KiB |