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 })
});
let retCode = response.json().code;
let retCredential = response.json().data.JSON;
let responseJson = response.json();
let retCode = responseJson.json().code;
if (retCode === 0) {
//登录成功
let retCredential = responseJson.data.Credential;
localStorage.setItem('auth', retCredential);
window.location.href = './config.html';
}