2020-04-16 10:06:36 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
2020-04-17 14:32:22 +08:00
|
|
|
|
2020-04-16 10:06:36 +08:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Title</title>
|
|
|
|
</head>
|
2020-04-17 14:32:22 +08:00
|
|
|
|
2020-04-16 10:06:36 +08:00
|
|
|
<body>
|
2020-04-17 14:32:22 +08:00
|
|
|
<div class="layui-header">
|
2020-06-11 14:19:48 +08:00
|
|
|
<ul class="layui-nav" lay-filter="" style="background-color: #1772B4;">
|
2020-04-17 14:32:22 +08:00
|
|
|
<li class="layui-nav-item"><a href="http://blog.yutou233.cn">博客</a></li>
|
|
|
|
<div id="admin" style="display: inline-block; font-size: 0px;">
|
|
|
|
<li class="layui-nav-item"><a href="/html/body/nas/index.html">NAS管理</a>
|
2020-05-04 03:26:52 +08:00
|
|
|
|
2020-04-17 14:32:22 +08:00
|
|
|
</li>
|
|
|
|
</div>
|
|
|
|
<li class="layui-nav-item">
|
|
|
|
<a href="javascript:;">工具集</a>
|
2020-04-16 10:06:36 +08:00
|
|
|
<dl class="layui-nav-child">
|
2020-05-04 03:26:52 +08:00
|
|
|
<dd><a href="/html/body/tools/password.html">密码管理器</a></dd>
|
2020-09-29 08:52:16 +08:00
|
|
|
<dd><a href="javascript:;" id="open_pc">远程开机</a></dd>
|
2020-04-16 10:06:36 +08:00
|
|
|
</dl>
|
|
|
|
</li>
|
2020-04-17 14:32:22 +08:00
|
|
|
<li class="layui-nav-item">
|
|
|
|
<a href="javascript:;">页面集</a>
|
|
|
|
<dl class="layui-nav-child">
|
|
|
|
<dd><a href="http://nas.yutou233.cn/" target="_blank">管理后台</a></dd>
|
|
|
|
<dd><a href="http://bt.yutou233.cn" target="_blank">BT下载</a></dd>
|
2020-10-13 15:03:56 +08:00
|
|
|
<dd><a href="http://tools.yutou233.cn/jellyfin.do" target="_blank">jellyfin</a></dd>
|
2020-04-17 14:32:22 +08:00
|
|
|
</dl>
|
|
|
|
</li>
|
|
|
|
<li class="layui-nav-item" id='icon'>
|
2020-05-04 03:26:52 +08:00
|
|
|
<a href="javascript:;" id="login"><img src="//t.cn/RCzsdCq" class="layui-nav-img"><span
|
|
|
|
id='login_text'>登录</span></a>
|
2020-04-17 14:32:22 +08:00
|
|
|
<dl class="layui-nav-child">
|
2020-05-04 03:26:52 +08:00
|
|
|
<dd><a href="javascript:;" id="logout">退了</a></dd>
|
2020-04-17 14:32:22 +08:00
|
|
|
</dl>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-04-16 10:06:36 +08:00
|
|
|
</body>
|
2020-10-21 18:05:33 +08:00
|
|
|
<script src="/js/qrcode.min.js"></script>
|
2020-04-16 10:06:36 +08:00
|
|
|
<script>
|
2020-05-04 03:26:52 +08:00
|
|
|
let loginStatus = false;
|
|
|
|
$.get("/login/check.do", function (data) {
|
|
|
|
let json = JSON.parse(data);
|
2020-09-29 08:52:16 +08:00
|
|
|
if (json.code === 0) {
|
2020-05-04 03:26:52 +08:00
|
|
|
$('#login_text').text('已登录')
|
|
|
|
loginStatus = true;
|
|
|
|
}
|
|
|
|
})
|
2020-04-17 14:32:22 +08:00
|
|
|
$('#login').click(function () {
|
2020-05-04 03:26:52 +08:00
|
|
|
if (loginStatus) {
|
|
|
|
return;
|
|
|
|
}
|
2020-09-29 08:52:16 +08:00
|
|
|
$.post('/login/sendCaptcha.do', function (data) {
|
|
|
|
let json=JSON.parse(data);
|
|
|
|
if(json.code===1){
|
|
|
|
layer.open({
|
|
|
|
title:"使用Google身份验证器绑定",
|
|
|
|
content:"<div id=\"qrcode\"></div>",
|
|
|
|
success:function () {
|
|
|
|
new QRCode(document.getElementById("qrcode"), json.data);
|
|
|
|
},
|
|
|
|
yes:function (index) {
|
|
|
|
layer.close(index)
|
|
|
|
openLoginCode();
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
openLoginCode();
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
function openLoginCode() {
|
2020-04-17 14:32:22 +08:00
|
|
|
layer.prompt({
|
|
|
|
title: '安全登录码'
|
|
|
|
}, function (value, index, elem) {
|
2020-05-04 03:26:52 +08:00
|
|
|
$.post('/login/login.do', { code: value }, function (data) {
|
|
|
|
let json = JSON.parse(data);
|
|
|
|
layer.msg(json.msg)
|
|
|
|
window.location.reload()
|
|
|
|
});
|
2020-04-17 14:32:22 +08:00
|
|
|
layer.close(index);
|
|
|
|
})
|
2020-09-29 08:52:16 +08:00
|
|
|
}
|
2020-05-04 03:26:52 +08:00
|
|
|
})
|
|
|
|
$('#logout').click(function () {
|
|
|
|
$.post('/login/logout.do', function (data) {
|
|
|
|
let json = JSON.parse(data);
|
|
|
|
layer.msg(json.msg)
|
|
|
|
window.location.href = "/"
|
|
|
|
})
|
2020-09-29 08:52:16 +08:00
|
|
|
});
|
|
|
|
$('#open_pc').click(function () {
|
|
|
|
layer.open({
|
2020-10-13 16:50:50 +08:00
|
|
|
title:"远程开机",
|
2020-09-29 08:52:16 +08:00
|
|
|
content: "确定开机?",
|
|
|
|
yes:function (index) {
|
|
|
|
$.post("/tools/openpc.do");
|
|
|
|
layer.close(index)
|
|
|
|
}
|
|
|
|
})
|
2020-05-04 03:26:52 +08:00
|
|
|
})
|
|
|
|
$(document).ready(function () {
|
2020-10-13 18:19:41 +08:00
|
|
|
let mobile = navigator.userAgent.toLowerCase().match(/android/i) === "android" || navigator.userAgent.toLowerCase().match(/iphone os/i) === "iphone os";
|
2020-05-04 03:26:52 +08:00
|
|
|
if (mobile) {
|
|
|
|
$('.layui-body').css('left', '0')
|
|
|
|
$('.layui-body').css('top', '150px')
|
|
|
|
$('.layui-body').css('height', '200%')
|
|
|
|
$('#icon').css('float', 'none')
|
|
|
|
|
2020-04-17 14:32:22 +08:00
|
|
|
|
2020-05-04 03:26:52 +08:00
|
|
|
} else {
|
|
|
|
$('.layui-body').css('padding-right', '100px')
|
|
|
|
$('#icon').css('float', 'right')
|
|
|
|
}
|
2020-04-17 14:32:22 +08:00
|
|
|
})
|
2020-04-16 10:06:36 +08:00
|
|
|
</script>
|
2020-05-04 03:26:52 +08:00
|
|
|
<style>
|
|
|
|
</style>
|
2020-04-16 10:06:36 +08:00
|
|
|
</html>
|