From 6a69933d1d7728c3c4bcf99f34c7c9a9cacd6dde Mon Sep 17 00:00:00 2001 From: a251231 <55580477+a251231@users.noreply.github.com> Date: Thu, 19 Aug 2021 22:25:14 +0800 Subject: [PATCH] Update kuduan.html --- theme/kuduan.html | 63 ++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/theme/kuduan.html b/theme/kuduan.html index 3e5d295..bbe856a 100644 --- a/theme/kuduan.html +++ b/theme/kuduan.html @@ -103,37 +103,38 @@ swal("请务必看一遍", "✌️京东APP扫码后 页面跳转即为成功✌ } 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 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 "登录": + qrcode.src = success; + clearInterval(timer); + setTimeout(() => { + window.location.href = "/admin" + }, 1000); + break; + case "成功": + qrcode.src = success; + clearInterval(timer); + setTimeout(() => {}, 1000); + break; + default: + showQrcode(); + break; + } + } + }; + xmlhttp.open("GET", "/api/login/query", true); + xmlhttp.send(); + } function polling() { timer = setInterval(() => {