From 8d1351a8a344bbfd65c715475be3f0a637390d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 7 May 2024 22:15:07 +0800 Subject: [PATCH] fix:login --- static/login.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/login.html b/static/login.html index cacbde6b..a10ea91f 100644 --- a/static/login.html +++ b/static/login.html @@ -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'; }