biliob/Web/html/_old_header.html

81 lines
2.6 KiB
HTML
Raw Normal View History

2021-04-01 14:44:02 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="referrer" content="no-referrer" />
<meta charset="UTF-8">
<title>DD监视器</title>
</head>
<body>
<div class="layui-header">
<ul class="layui-nav" lay-filter="" style="background-color: #1772B4;">
<li class="layui-nav-item">DD监视器</li>
<div id="admin" style="display: inline-block; font-size: 0px;">
<li class="layui-nav-item"><a href="/html/body/bilibili/upInfo.html">UP管理</a>
</li>
</div>
<li class="layui-nav-item">
<a href="/html/body/bilibili/realTimeData.html">实时数据</a>
</li>
<li class="layui-nav-item">
<a href="/html/body/bilibili/overview.html">数据统计</a>
</li>
<li class="layui-nav-item" id='icon'>
<a href="javascript:;" id="login"><img src="https://static.hdslb.com/images/akari.jpg" class="layui-nav-img" id="icon_img"><span
id='login_text'>登录</span></a>
<dl class="layui-nav-child">
<dd><a href="javascript:;" id="logout">退了</a></dd>
</dl>
</li>
</ul>
</div>
</body>
<script src="/js/qrcode.min.js"></script>
<script>
let loginStatus = false;
$.post('/user/get/test.do',function (json) {
$('#login_text').text(json.data.uname);
$('#icon_img').attr("src",json.data.icon);
loginStatus=true;
})
$('#login').click(function () {
if (loginStatus) {
return;
}
$.post('/login/login.do',function (json) {
console.log(json)
layer.open({
title: "BiliBili客户端扫描登陆",
content: "<div id=\"qrcode\"></div>",
success: function () {
new QRCode(document.getElementById("qrcode"), json.url);
},
yes: function (index) {
layer.close(index)
window.location.reload();
}
})
})
})
$(document).ready(function () {
let mobile = layui.device().mobile;
if (mobile) {
$('.layui-body').css('left', '0')
$('.layui-body').css('top', '150px')
$('.layui-body').css('height', '200%')
$('#icon').css('float', 'none')
} else {
$('.layui-body').css('padding-right', '100px')
$('#icon').css('float', 'right')
}
})
</script>
<style>
</style>
</html>