fix:login

This commit is contained in:
手瓜一十雪 2024-05-07 22:15:07 +08:00
parent e6e68a6036
commit 8d1351a8a3

View File

@ -92,10 +92,11 @@
}, },
body: JSON.stringify({ token: tokenInput.value }) body: JSON.stringify({ token: tokenInput.value })
}); });
let retCode = response.json().code; let responseJson = response.json();
let retCredential = response.json().data.JSON; let retCode = responseJson.json().code;
if (retCode === 0) { if (retCode === 0) {
//登录成功 //登录成功
let retCredential = responseJson.data.Credential;
localStorage.setItem('auth', retCredential); localStorage.setItem('auth', retCredential);
window.location.href = './config.html'; window.location.href = './config.html';
} }