This commit is contained in:
duanxiaohai 2024-10-08 16:49:42 +08:00
commit 704dae5109
1 changed files with 5 additions and 14 deletions

View File

@ -196,27 +196,18 @@ const login = () => {
const decodedText = decrypt(encryptedText, ENCODED_KEY);
// console.log("Decrypted Text:", decodedText);
var tokenU = decodedText;
}if else (){
}
// 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;
}
});
};