-
Notifications
You must be signed in to change notification settings - Fork 272
/
Copy pathrandom.html
147 lines (141 loc) · 7.16 KB
/
random.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<title>
JD — 任务助手
</title>
<meta charset="utf-8" />
<meta content="webkit" name="renderer" />
<meta content="Updates and statistics" name="description" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="telephone=no,email=no" name="format-detection" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta content="no-siteapp" http-equiv="Cache-Control" />
<link href="https://cdn.jsdelivr.net/gh/mt-theme/[email protected]/metron/css/fonts.css?family=Poppins:300,400,500,600,700" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/gh/mt-theme/[email protected]/metron/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/gh/mt-theme/[email protected]/metron/css/style.bundle.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/gh/mt-theme/[email protected]/metron/css/pages/auth/style-1.css" rel="stylesheet" type="text/css" />
<link href="https://i.loli.net/2021/07/29/ID6WEsptP8i1Fhq.gif" rel="shortcut icon" />
</head>
<body class="quick-panel-right demo-panel-right offcanvas-right header-fixed subheader-enabled page-loading" id="kt_body">
<div class="d-flex flex-column flex-root">
<div class="login login-1 login-signin-on d-flex flex-row-fluid" id="kt_login">
<div class="d-flex flex-center bgi-size-cover bgi-no-repeat flex-row-fluid" id="bd">
<div class="login-form text-center text-white p-7 position-relative overflow-hidden">
<div class="login-signin">
<form class="form" id="login_form">
<br>
<br>
<br>
<br><br>
<div>
<img class="middle" height="170em" id="qrcode" src="./ok.svg" />
</div>
<div class="form-group text-center mt-10" style="white-space:nowrap;">
<button class="btn btn-pill btn-outline-white font-weight-bold opacity-90 px-15 py-3" href="#" id="jumpapp" type="button">
<b style="text-shadow: black 0.2em 0.2em 0em">
跳转APP登录
</b>
</button>
</div>
</form>
<div style="margin-right: 25px;font-size: 15px">
<a class="pdl" clstag="pageclick|keycount|login_pc_201804112|3" href="javascript:void(0)" onclick="window.location.href='https://qm.qq.com/cgi-bin/qm/qr?k=qxuXFR_ljJErBKqwksVWnpN2ljPMkXVe&jump_from=webapi'" style="margin: 0px; padding: 0px 0px 0px 24px; color: white; text-decoration: none; position: relative;">
<span style="margin: 0px; padding: 0px;text-shadow: black 0.2em 0.2em 0em"><b>
QQ通知 </b>
</span>
</a>
<span class="line" style="margin: 0px; padding: 0px 10px; color: rgb(204, 204, 204);">
|
</span>
<a class="pdl" clstag="pageclick|keycount|login_pc_201804112|4" href="javascript:void(0)" onclick="window.location.href='https://ghproxy.com/https://github.com/U188/JDC/blob/master/showqrcode.jpg'" style="margin: 0px; padding: 0px 0px 0px 1px; color: white; text-decoration: none; position: relative;">
<span style="margin: 0px; padding:0px;text-shadow: black 0.2em 0.2em 0em"> <b>
微信通知 </b>
</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
var backbd = Math.floor(Math.random() * 11);
document.getElementById("bd").style = "background-image:url('./static/rz" + backbd + ".jpeg')";
var timer;
var qrcode = document.getElementById("qrcode")
var loginUrl = ""
var success = "https://ghproxy.com/https://raw.githubusercontent.com/U188/JDC/master/ok.svg";
var jumpapp = document.getElementById('jumpapp')
var hd = document.getElementById("hd")
function showQrcode() {
var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
data = JSON.parse(xmlhttp.responseText)
if (data.url && data.url.indexOf("http") != -1) {
qrcode.src = "data:image/png;base64," + data.img
loginUrl = data.url
} else {
showQrcode()
}
}
}
xmlhttp.open("GET", "/api/login/qrcode", true);
xmlhttp.send();
}
showQrcode()
function login() {
var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var results = xmlhttp.responseText
console.log(results)
switch (results) {
case "授权登录未确认":
break;
case "登录":
setTimeout(() => {
window.location.href = "/admin"
}, 1000);
case "成功":
//hd.style.visibility = "hidden";
qrcode.src = success
clearInterval(timer)
break;
default:
showQrcode()
break;
}
}
}
xmlhttp.open("GET", "/api/login/query", true);
xmlhttp.send();
}
function polling() {
timer = setInterval(() => {
login()
}, 1500);
}
polling()
jumpapp.addEventListener('click', function() {
if (loginUrl) {
window.location.href = `openapp.jdmobile://virtual/ad?params=${encodeURI(
JSON.stringify({
category: 'jump',
des: 'ThirdPartyLogin',
action: 'to',
onekeylogin: 'return',
url: loginUrl,
authlogin_returnurl: 'weixin://',
browserlogin_fromurl: window.location.host,
})
)}`;
} else {
alert('还没加载好,请稍后重试');
}
})
</script>
</html>