From 4984046e8e6ce8a7d9f19f883cefff995bdec2e5 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Tue, 8 Oct 2024 16:47:35 +0800 Subject: [PATCH] gx --- src/view/guide.vue | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/view/guide.vue b/src/view/guide.vue index 781e2ec..920f84f 100644 --- a/src/view/guide.vue +++ b/src/view/guide.vue @@ -196,27 +196,20 @@ const login = () => { if (routers.query.token) { const encryptedText = routers.query.token; const decodedText = decrypt(encryptedText, ENCODED_KEY); - console.log("Decrypted Text:", decodedText); + // console.log("Decrypted Text:", decodedText); var tokenU = decodedText; - } - // var tokenU = CryptoJS.enc.Utf8.parse(routers.query.token); - // var token = getCookie("lytoken"); - // tokenU = "6b0e380b4a8f46baae4923f83faf670d"; - if (tokenU) { document.cookie = `lytoken=${tokenU}`; var token = getCookie("lytoken"); - if (!token) { + tools.data.set("token", token); + tools.data.set("type", 2); + } else { + var tokenPd = getCookie("lytoken"); + if (!tokenPd) { window.location.href = "http://220.191.238.50:996/api/login?returnURL=" + window.location.href; } else { - tools.data.set("token", token); - tools.data.set("type", 2); } - } else { - window.location.href = - "http://220.191.238.50:996/api/login?returnURL=" + - window.location.href; } }); };