aoi / index.html
cuio's picture
Update index.html
a451929 verified
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>deepseek</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://new.hkems-stmo.top/css/bootstrap.min.css" />
<script src="https://new.hkems-stmo.top/js/bootstrap.bundle.min.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<!--调用需要的框架文件-->
<style>
/* 遮罩层,用于挡住内容 */
#overlayverify {
position: fixed;
left: 0px;
top: 0px;
height: 100%;
background-color: #cccccc;
z-index: 100
}
/* 模态框主体 */
.popup {
background-color: #ffffff;
height: 430px;
border-radius: 5px;
margin: 100px auto;
text-align: center
}
/* 模态框的标题 */
.popup_title {
height: 60px;
line-height: 60px;
border-bottom: solid 1px #cccccc
}
/* 模态框的内容 */
.popup_content {
text-align: left;
margin: 0 auto;
width: 90%;
height: 200px;
line-height: 45px;
padding: 10px 20px;
text-indent: 2em
}
.popup_line {
margin: 0 auto;
height: 20px;
width: 85%;
border-bottom: 1px solid #dbdbdb
}
/* 模态框的按钮栏 */
.popup_btn {
padding-top: 30px
}
/* 弹出框的按钮 */
.popup_btn button.ds {
color: #778899;
width: 40%;
height: 40px;
cursor: pointer;
border: solid 1px #cccccc;
border-radius: 5px;
margin: 5px 10px;
color: #ffffff;
background-color: rgb(150, 150, 150)
}
.popup_btn button.ag {
color: #778899;
width: 40%;
height: 40px;
cursor: pointer;
border: solid 1px #cccccc;
border-radius: 5px;
margin: 5px 10px;
color: #ffffff;
background-color: #337ab7
}
</style>
<script>
var testV = 3;
/*定义最高尝试次数*/
var error = 0;
/*定义初始错误量*/
var accountlist = ['admin', 'amd2'];
var passwordlist = ['pas167534', 'dhjnvc5685'];
/*定义账号密码列表*/
function verify() {
/*用户提交验证*/
var account = AandP.account.value;
var password = AandP.password.value;
/*从AandP表单里获取用户输入的账号密码,为相应的变量名赋值*/
if (testV > 1) {
/*如果尝试机会>1*/
if (accountlist.indexOf(account) == -1) {
/*则使用accountlist.indexOf(account)方法获得输入的用户名在用户列表的位数,用if语句判断如果等于-1(即不存在)*/
error += 1;
/*则使error变量+1*/
}
else {
/*如果不等于-1,即意味着用户输入的用户名存在,就可以接着进行密码的核验*/
var Correspondingpassword = passwordlist[accountlist.indexOf(account)];
/*用 列表名[位数(通过accountlist.indexOf(account)获得)] 方法查询到用户输入的用户名相对应的密码,赋入Correspondingpassword变量*/
if (Correspondingpassword == password) {
out.innerHTML = '账号密码正确,验证通过';
}
/*将用户输入的密码与查询到与用户输入的用户名相对应的密码对比,如果成功则用innerHTML将提示输出到id为out的块组件*/
else {
error += 1;
}
/*如果不匹配,对error变量+1*/
}
if (error != 0) {
/*验证部分结束。如果error变量不等于零,即至少发生了账号错误或账号密码不匹配中的一个事件:*/
testV -= 1
out.innerHTML = '账号或密码错误,你还剩' + testV + '次机会';
/*让尝试次数testV-1,然后用innerHTML将提示输出到id为out的块组件*/
}
else {
/*如果error变量等于零,则验证成功*/
overlayverify.style.display = "none";
/*为挡住页面的模态框写入“display:none”的样式,使其消失*/
}
}
else {
/*如果尝试机会<1,即没有尝试机会了*/
out.innerHTML = '登陆冻结,请刷新或联系管理员';
/*用innerHTML将提示输出到id为out的块组件*/
}
document.getElementById("AandP").reset();
/*重置用户输入的数据*/
}
function dontknow() {
/*用户不知道密码*/
window.location.href = 'https://h5.m.taobao.com/awp/core/detail.htm?id=903202386495&spm=a2141.7631671.content.1'
/*跳转到其他页面*/
}
</script>
</head>
<body>
<div class="container">
<div class="row">
<div id="overlayverify" style="display: block;">
<!--建立遮罩层挡住内容-->
<div class="col-sm-2 col-lg-4"></div>
<!--bootstarp框架,用于调节样式-->
<div class="popup col-sm-8 col-lg-4">
<!--建立一个模态框-->
<p class="popup_title">统一身份验证验证</p>
<p class="popup_content overflow-auto" style="line-height: 40px;">欢迎访问,在进行浏览前,我们需要验证你的身份。
</p>
<!--说明-->
<form name="AandP" style="margin-top: -20%;">
<!--建立名为AandP的表单(Account and Password),容纳用户输入进输入框的内容-->
<input class="form-control signinput" id="account" placeholder="请输入账号:"
style="width: 80%;margin-left: 10%;margin-bottom: 15px;" />
<input class="form-control" id="password" type="password" placeholder="请输入密码"
style="width: 80%;margin-left: 10%;margin-bottom: 10px;" />
<!--分别设置了账号密码的输入框,各自用id="xxx"来标识-->
</form>
<div id="out" style="color: red;"></div>
<!--建立一个id为out的输出反馈的div,登陆失败等信息被写入到这-->
<div class="popup_line"></div>
<div class="popup_btn" style="margin-top: -20px;">
<button class="cancelBtn ds overflow-hidden" onclick="dontknow()">我不知道密码</button>
<button class="confirmBtn ag overflow-hidden" onclick="verify()">验证并访问</button>
<!--用onclick绑定函数,点击按钮运行onclick指定的函数-->
</div>
</div>
<div class="col-sm-2 col-lg-4"></div>
<!--bootstarp框架,用于调节样式-->
</div>
</div>
</div>
<div>
<!--在这里写入你想在通过验证之后展示的内容-->
<script>
(function () {
function isMobile() {
// 获取用户代理字符串
const userAgent =
navigator.userAgent || navigator.vendor || window.opera;
// 定义常见移动设备的用户代理标识
const mobileRegex =
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i;
// 测试用户代理字符串是否匹配移动设备的标识
return mobileRegex.test(userAgent);
}
const isMobileDevice = isMobile();
const iframe = document.createElement("iframe");
iframe.style.width = "100%";
iframe.style.height = "100vh";
iframe.style.border = "none";
iframe.allow="microphone; camera";
iframe.src="https://open-avatar.holoworld.com.cn:8282/";
iframe.sandbox="allow-scripts allow-same-origin";
document.body.appendChild(iframe);
})();
</script>
</div>
</body>
</html>