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>
|
2021-06-10 18:28:38 +08:00
|
|
|
<meta name="referrer" content="no-referrer"/>
|
2020-04-16 10:06:36 +08:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Title</title>
|
2021-06-10 18:28:38 +08:00
|
|
|
<link rel="stylesheet" href="/layui/css/layui.css">
|
2022-04-02 23:31:26 +08:00
|
|
|
<link rel="stylesheet" href="/css/my.css">
|
2020-04-16 10:06:36 +08:00
|
|
|
</head>
|
2020-04-17 14:32:22 +08:00
|
|
|
|
2020-04-16 10:06:36 +08:00
|
|
|
<body>
|
2021-02-23 11:16:56 +08:00
|
|
|
<div class="layui-header">
|
|
|
|
<ul class="layui-nav" lay-filter="" style="background-color: #1772B4;">
|
|
|
|
<li class="layui-nav-item"><a href="http://blog.yutou233.cn">博客</a></li>
|
|
|
|
<div id="admin" style="display: inline-block; font-size: 0px;">
|
2022-03-28 18:38:32 +08:00
|
|
|
<li class="layui-nav-item">
|
|
|
|
<a href="javascript:;">NAS管理</a>
|
|
|
|
<dl class="layui-nav-child">
|
|
|
|
<dd><a href="/html/body/nas/ip.html">ip</a></dd>
|
|
|
|
</dl>
|
2020-04-16 10:06:36 +08:00
|
|
|
</li>
|
2021-02-23 11:16:56 +08:00
|
|
|
</div>
|
|
|
|
<li class="layui-nav-item">
|
|
|
|
<a href="javascript:;">工具集</a>
|
|
|
|
<dl class="layui-nav-child">
|
2022-03-28 18:38:32 +08:00
|
|
|
<dd><a href="/html/body/tools/clash.html">管理Clash</a></dd>
|
2021-02-23 11:16:56 +08:00
|
|
|
<dd><a href="/html/body/tools/password.html">密码管理器</a></dd>
|
|
|
|
<dd><a href="javascript:;" id="open_pc">远程开机</a></dd>
|
2022-04-02 23:31:26 +08:00
|
|
|
<dd><a href="/html/body/nas/cctv.html">监控</a></dd>
|
|
|
|
<dd><a href="/html/body/nas/animrss.html">动画RSS</a></dd>
|
|
|
|
<dd><a href="/html/body/nas/animMeta.html">动画元数据设置</a></dd>
|
|
|
|
<dd><a href="/html/body/nas/oss.html">OSS备份设置</a></dd>
|
2021-02-23 11:16:56 +08:00
|
|
|
</dl>
|
|
|
|
</li>
|
|
|
|
<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>
|
2021-09-13 21:28:58 +08:00
|
|
|
<dd><a href="http://jellyfin.yutou233.cn:7800/" target="_blank">jellyfin</a></dd>
|
2021-02-23 11:16:56 +08:00
|
|
|
<dd><a href="/html/body/nas/music.html">NAS音乐播放器</a></dd>
|
2022-09-04 12:47:26 +08:00
|
|
|
<dd><a href="/html/body/tools/calendar.html">日历</a></dd>
|
2021-02-23 11:16:56 +08:00
|
|
|
</dl>
|
|
|
|
</li>
|
|
|
|
<li class="layui-nav-item" id='icon'>
|
|
|
|
<a href="javascript:;" id="login"><img src="/assets/defaultPlayImg.jpg" class="layui-nav-img"><span
|
|
|
|
id='login_text'>登录</span></a>
|
|
|
|
<dl class="layui-nav-child">
|
|
|
|
<dd><a href="javascript:;" id="logout">退了</a></dd>
|
|
|
|
</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>
|
2021-06-10 18:28:38 +08:00
|
|
|
<script src="/js/jquery-3.2.1.js"></script>
|
2022-03-28 18:38:32 +08:00
|
|
|
<script src="/layui/layui.js"></script>
|
2021-10-23 13:03:45 +08:00
|
|
|
<script src="/js/myjs.js"></script>
|
2020-04-16 10:06:36 +08:00
|
|
|
<script>
|
2020-05-04 03:26:52 +08:00
|
|
|
let loginStatus = false;
|
2021-10-23 13:03:45 +08:00
|
|
|
window.onload=function (){
|
|
|
|
if(getParam('type')==='login'&&!loginStatus){
|
|
|
|
onLogin()
|
2020-05-04 03:26:52 +08:00
|
|
|
}
|
2021-10-23 13:03:45 +08:00
|
|
|
}
|
|
|
|
$.get("/login/check.do",{share:getParam("share")}, function (data) {
|
|
|
|
try {
|
|
|
|
let json = JSON.parse(data);
|
|
|
|
if (json.code === 0) {
|
|
|
|
$('#login_text').text('已登录')
|
|
|
|
loginStatus = true;
|
|
|
|
}else if(json.code===-1&&getParam("type")!=='login'){
|
|
|
|
window.location.href='/?type=login'
|
|
|
|
}
|
|
|
|
}catch (e) {
|
|
|
|
window.location.href='/'
|
|
|
|
}
|
|
|
|
|
2020-05-04 03:26:52 +08:00
|
|
|
})
|
2020-04-17 14:32:22 +08:00
|
|
|
$('#login').click(function () {
|
2020-05-04 03:26:52 +08:00
|
|
|
if (loginStatus) {
|
|
|
|
return;
|
|
|
|
}
|
2021-10-23 13:03:45 +08:00
|
|
|
onLogin()
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
$('#logout').click(function () {
|
|
|
|
$.post('/login/logout.do', function (data) {
|
|
|
|
let json = JSON.parse(data);
|
|
|
|
layer.msg(json.msg)
|
|
|
|
window.location.href = "/"
|
|
|
|
})
|
|
|
|
});
|
|
|
|
$('#open_pc').click(function () {
|
|
|
|
layer.open({
|
|
|
|
title: "远程开机",
|
|
|
|
content: "确定开机?",
|
|
|
|
yes: function (index) {
|
|
|
|
$.post("/tools/openpc.do");
|
|
|
|
layer.close(index)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
function onLogin(){
|
2021-07-09 17:54:30 +08:00
|
|
|
$.get('/login/sendCaptcha.do', function (data) {
|
2021-02-23 11:16:56 +08:00
|
|
|
let json = JSON.parse(data);
|
|
|
|
if (json.code === 1) {
|
2020-09-29 08:52:16 +08:00
|
|
|
layer.open({
|
2021-02-23 11:16:56 +08:00
|
|
|
title: "使用Google身份验证器绑定",
|
|
|
|
content: "<div id=\"qrcode\"></div>",
|
|
|
|
success: function () {
|
2020-09-29 08:52:16 +08:00
|
|
|
new QRCode(document.getElementById("qrcode"), json.data);
|
|
|
|
},
|
2021-02-23 11:16:56 +08:00
|
|
|
yes: function (index) {
|
2020-09-29 08:52:16 +08:00
|
|
|
layer.close(index)
|
|
|
|
openLoginCode();
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
2021-02-23 11:16:56 +08:00
|
|
|
} else {
|
2020-09-29 08:52:16 +08:00
|
|
|
openLoginCode();
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
2021-10-23 13:03:45 +08:00
|
|
|
}
|
|
|
|
function openLoginCode() {
|
|
|
|
layer.prompt({
|
|
|
|
title: '安全登录码'
|
|
|
|
}, function (value, index, elem) {
|
|
|
|
$.post('/login/login.do', {code: value,"login":true}, function (data) {
|
|
|
|
let json = JSON.parse(data);
|
|
|
|
layer.msg(json.msg, function () {
|
|
|
|
window.location.reload()
|
|
|
|
})
|
|
|
|
});
|
|
|
|
layer.close(index);
|
2020-09-29 08:52:16 +08:00
|
|
|
})
|
2021-10-23 13:03:45 +08:00
|
|
|
}
|
2020-05-04 03:26:52 +08:00
|
|
|
$(document).ready(function () {
|
2021-02-23 11:16:56 +08:00
|
|
|
let mobile = layui.device().mobile;
|
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')
|
2021-02-23 11:16:56 +08:00
|
|
|
$('.layui-body').css('position','absolute')
|
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')
|
2021-02-23 11:16:56 +08:00
|
|
|
$('.layui-body').css('position','fixed')
|
2020-05-04 03:26:52 +08:00
|
|
|
}
|
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>
|