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/home.html
Yutousama ec6f658935 修复home页面的乱码问题
广告会通知到微信
监听/路径
2020-04-02 00:19:43 +08:00

192 lines
6.3 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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>