cuio commited on
Commit
a451929
·
verified ·
1 Parent(s): 1da2d85

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +218 -18
index.html CHANGED
@@ -1,19 +1,219 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>deepseek</title>
7
+
8
+
9
+ <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
10
+ <link rel="stylesheet" type="text/css" href="https://new.hkems-stmo.top/css/bootstrap.min.css" />
11
+ <script src="https://new.hkems-stmo.top/js/bootstrap.bundle.min.js"></script>
12
+ <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
13
+ <!--调用需要的框架文件-->
14
+
15
+ <style>
16
+ /* 遮罩层,用于挡住内容 */
17
+ #overlayverify {
18
+ position: fixed;
19
+ left: 0px;
20
+ top: 0px;
21
+ height: 100%;
22
+ background-color: #cccccc;
23
+ z-index: 100
24
+ }
25
+
26
+ /* 模态框主体 */
27
+ .popup {
28
+ background-color: #ffffff;
29
+ height: 430px;
30
+ border-radius: 5px;
31
+ margin: 100px auto;
32
+ text-align: center
33
+ }
34
+
35
+ /* 模态框的标题 */
36
+ .popup_title {
37
+ height: 60px;
38
+ line-height: 60px;
39
+ border-bottom: solid 1px #cccccc
40
+ }
41
+
42
+ /* 模态框的内容 */
43
+ .popup_content {
44
+ text-align: left;
45
+ margin: 0 auto;
46
+ width: 90%;
47
+ height: 200px;
48
+ line-height: 45px;
49
+ padding: 10px 20px;
50
+ text-indent: 2em
51
+ }
52
+
53
+ .popup_line {
54
+ margin: 0 auto;
55
+ height: 20px;
56
+ width: 85%;
57
+ border-bottom: 1px solid #dbdbdb
58
+ }
59
+
60
+ /* 模态框的按钮栏 */
61
+ .popup_btn {
62
+ padding-top: 30px
63
+ }
64
+
65
+ /* 弹出框的按钮 */
66
+ .popup_btn button.ds {
67
+ color: #778899;
68
+ width: 40%;
69
+ height: 40px;
70
+ cursor: pointer;
71
+ border: solid 1px #cccccc;
72
+ border-radius: 5px;
73
+ margin: 5px 10px;
74
+ color: #ffffff;
75
+ background-color: rgb(150, 150, 150)
76
+ }
77
+
78
+ .popup_btn button.ag {
79
+ color: #778899;
80
+ width: 40%;
81
+ height: 40px;
82
+ cursor: pointer;
83
+ border: solid 1px #cccccc;
84
+ border-radius: 5px;
85
+ margin: 5px 10px;
86
+ color: #ffffff;
87
+ background-color: #337ab7
88
+ }
89
+ </style>
90
+ <script>
91
+ var testV = 3;
92
+ /*定义最高尝试次数*/
93
+ var error = 0;
94
+ /*定义初始错误量*/
95
+ var accountlist = ['admin', 'amd2'];
96
+ var passwordlist = ['pas167534', 'dhjnvc5685'];
97
+ /*定义账号密码列表*/
98
+ function verify() {
99
+ /*用户提交验证*/
100
+ var account = AandP.account.value;
101
+ var password = AandP.password.value;
102
+ /*从AandP表单里获取用户输入的账号密码,为相应的变量名赋值*/
103
+ if (testV > 1) {
104
+ /*如果尝试机会>1*/
105
+ if (accountlist.indexOf(account) == -1) {
106
+ /*则使用accountlist.indexOf(account)方法获得输入的用户名在用户列表的位数,用if语句判断如果等于-1(即不存在)*/
107
+ error += 1;
108
+ /*则使error变量+1*/
109
+ }
110
+ else {
111
+ /*如果不等于-1,即意味着用户输入的用户名存在,就可以接着进行密码的核验*/
112
+ var Correspondingpassword = passwordlist[accountlist.indexOf(account)];
113
+ /*用 列表名[位数(通过accountlist.indexOf(account)获得)] 方法查询到用户输入的用户名相对应的密码,赋入Correspondingpassword变量*/
114
+ if (Correspondingpassword == password) {
115
+ out.innerHTML = '账号密码正确,验证通过';
116
+ }
117
+ /*将用户输入的密码与查询到与用户输入的用户名相对应的密码对比,如果成功则用innerHTML将提示输出到id为out的块组件*/
118
+ else {
119
+ error += 1;
120
+ }
121
+ /*如果不匹配,对error变量+1*/
122
+ }
123
+ if (error != 0) {
124
+ /*验证部分结束。如果error变量不等于零,即至少发生了账号错误或账号密码不匹���中的一个事件:*/
125
+ testV -= 1
126
+ out.innerHTML = '账号或密码错误,你还剩' + testV + '次机会';
127
+ /*让尝试次数testV-1,然后用innerHTML将提示输出到id为out的块组件*/
128
+ }
129
+ else {
130
+ /*如果error变量等于零,则验证成功*/
131
+ overlayverify.style.display = "none";
132
+ /*为挡住页面的模态框写入“display:none”的样式,使其消失*/
133
+ }
134
+ }
135
+ else {
136
+ /*如果尝试机会<1,即没有尝试机会了*/
137
+ out.innerHTML = '登陆冻结,请刷新或联系管理员';
138
+ /*用innerHTML将提示输出到id为out的块组件*/
139
+ }
140
+ document.getElementById("AandP").reset();
141
+ /*重置用户输入的数据*/
142
+ }
143
+
144
+ function dontknow() {
145
+ /*用户不知道密码*/
146
+ window.location.href = 'https://h5.m.taobao.com/awp/core/detail.htm?id=903202386495&spm=a2141.7631671.content.1'
147
+ /*跳转到其他页面*/
148
+ }
149
+ </script>
150
+ </head>
151
+
152
+ <body>
153
+ <div class="container">
154
+ <div class="row">
155
+ <div id="overlayverify" style="display: block;">
156
+ <!--建立遮罩层挡住内容-->
157
+ <div class="col-sm-2 col-lg-4"></div>
158
+ <!--bootstarp框架,用于调节样式-->
159
+ <div class="popup col-sm-8 col-lg-4">
160
+ <!--建立一个模态框-->
161
+ <p class="popup_title">统一身份验证验证</p>
162
+ <p class="popup_content overflow-auto" style="line-height: 40px;">欢迎访问,在进行浏览前,我们需要验证你的身份。
163
+ </p>
164
+ <!--说明-->
165
+ <form name="AandP" style="margin-top: -20%;">
166
+ <!--建立名为AandP的表单(Account and Password),容纳用户输入进输入框的内容-->
167
+ <input class="form-control signinput" id="account" placeholder="请输入账号:"
168
+ style="width: 80%;margin-left: 10%;margin-bottom: 15px;" />
169
+ <input class="form-control" id="password" type="password" placeholder="请输入密码"
170
+ style="width: 80%;margin-left: 10%;margin-bottom: 10px;" />
171
+ <!--分别设置了账号密码的输入框,各自用id="xxx"来标识-->
172
+ </form>
173
+ <div id="out" style="color: red;"></div>
174
+ <!--建立一个id为out的输出反馈的div,登陆失败等信息被写入到这-->
175
+ <div class="popup_line"></div>
176
+ <div class="popup_btn" style="margin-top: -20px;">
177
+ <button class="cancelBtn ds overflow-hidden" onclick="dontknow()">我不知道密码</button>
178
+ <button class="confirmBtn ag overflow-hidden" onclick="verify()">验证并访问</button>
179
+ <!--用onclick绑定函数,点击按钮运行onclick指定的函数-->
180
+ </div>
181
+ </div>
182
+ <div class="col-sm-2 col-lg-4"></div>
183
+ <!--bootstarp框架,用于调节样式-->
184
+ </div>
185
+ </div>
186
+ </div>
187
+ <div>
188
+
189
+ <!--在这里写入你想在通过验证之后展示的内容-->
190
+ <script>
191
+ (function () {
192
+ function isMobile() {
193
+ // 获取用户代理字符串
194
+ const userAgent =
195
+ navigator.userAgent || navigator.vendor || window.opera;
196
+
197
+ // 定义常见移动设备的用户代理标识
198
+ const mobileRegex =
199
+ /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i;
200
+
201
+ // 测试用户代理字符串是否匹配移动设备的标识
202
+ return mobileRegex.test(userAgent);
203
+ }
204
+ const isMobileDevice = isMobile();
205
+
206
+ const iframe = document.createElement("iframe");
207
+ iframe.style.width = "100%";
208
+ iframe.style.height = "100vh";
209
+ iframe.style.border = "none";
210
+ iframe.allow="microphone; camera";
211
+ iframe.src="https://open-avatar.holoworld.com.cn:8282/";
212
+ iframe.sandbox="allow-scripts allow-same-origin";
213
+
214
+ document.body.appendChild(iframe);
215
+ })();
216
+ </script>
217
+ </div>
218
+ </body>
219
  </html>