-
Notifications
You must be signed in to change notification settings - Fork 272
/
Copy pathnoodin.html
178 lines (173 loc) · 6.85 KB
/
noodin.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<title>吃面啦</title>
<style>
#judge_weixin{
display:none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,.5);
}
.judge-weixin-img{
height:50px;
padding-top: 10px;
}
.judge-weixin-img .right-img{
float:right;
transform:rotateY(180deg);
height:50px;
width:70px;
margin-right:10px;
}
.weixin-text{
display: flex;
justify-content:center;
align-items: center;
height:40px;
color: #fff;
font-weight: 700;
}
.weixin-text img{
height:18px;
margin-right: 4px;
}
</style>
</head>
<body style="height:100vh;width:100%;background-attachment:fixed;background-size: cover;-webkit-background-size: cover;-o-background-size: cover;background-image:url(https://s3.bmp.ovh/imgs/2021/08/888f802bdb4029a5.jpeg);background-repeat: no-repeat;background-position: center 0;">
<div style="padding-top:10%;text-align:center;">
<p>
<img id="hd" src="" width="100">
<p style="position: relative;top: 10px; left: 0px;font-size:2vh;color:#fff;">
<b></b> <br>
</p>
<div><img id="qrcode" height="170em" class="middle" src="./ok.svg" /></div>
<p style="font-size:2vh;color:#fff;">
<b>扫码登陆</b> <br>
</p>
<p>
<a style="position: relative;top: 20px; left: 0px;border-radius:8px;padding:6px 20px;font-size:2vh;color:#fff;border-style:solid;text-decoration:none;" id="jumpapp" href="#">京东APP登陆</a>
<br>
</p>
<p style="position: relative;top: 20vh; left: 0px;text-align: center;font-size:2vh;color:#fff;">TG交流:
<a style="text-decoration:none;color:#fff;" href="https://t.me/cdles">✈️ 好好学习 ✈️</a>
<br>
<a style="font-size:1.5vh;text-decoration:none;color:#fff;">扫码程序:
<script>document.write(returnCitySN["cname"])</script>
©
<a style="font-size:1.5vh;text-decoration:none;color:#fff;" href="https://github.com/cdle">Cdle作者</a>
<a style="font-size:1.5vh;color:#fff;"> 网页源码:
<script>document.write(returnCitySN["cname"])</script>
©
<a style="font-size:1.5vh;text-decoration:none;color:#fff;">不知道</a>
<a style="font-size:1.5vh;color:#fff;"> 最终修改:
<script>document.write(returnCitySN["cname"])</script>
©
<a style="font-size:1.5vh;text-decoration:none;color:#fff;">MADAO</a>
<br>
<a style="font-size:1vh;font-size:1vh;color:#fff;">程序版本 v1.0.2</a>
</p>
<script type="text/javascript" color="255,255,255" opacity='0.7' zIndex="-2" count="200" src="https://cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script>
</div>
<div id="judge_weixin">
<div class="judge-weixin-img">
<img class="right-img" src="https://i.loli.net/2021/08/23/n1MuTY8o2siLarD.png" alt="">
</div>
<div class="weixin-text">
<img src="https://i.loli.net/2021/08/23/qRB8kCSPjbDfycJ.png" alt="">
<span>点击右上角选择浏览器中打开</span>
</div>
</div>
</body>
<script>
var timer;
var qrcode = document.getElementById("qrcode")
var loginUrl = ""
var success = "https://ghproxy.com/https://raw.githubusercontent.com/764763903a/xdd-plus/main/static/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 "登录":
hd.style.visibility = "hidden";
qrcode.src = success
clearInterval(timer)
setTimeout(() => {
window.location.href = "/admin"
}, 1000);
break;
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);
}
function is_weixin(){
return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1;
}
polling()
jumpapp.addEventListener('click', function() {
if(is_weixin()){
document.getElementById('judge_weixin').style.display = 'block';
}else{
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>