From ca0529631719b75a7d8d94e3b6b86547bcee5532 Mon Sep 17 00:00:00 2001 From: HoshinoSuzumi Date: Fri, 22 Mar 2024 18:01:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9F=AD=E4=BF=A1=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E5=8F=91=E9=80=81=E9=94=99=E8=AF=AF=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.vue | 2 +- components/ModalAuthentication.vue | 68 +++++++++++++++++------------- 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/app.vue b/app.vue index 6868ce1..e65ff4d 100644 --- a/app.vue +++ b/app.vue @@ -8,7 +8,7 @@ const loginState = useLoginState() onMounted(() => { loginState.checkSession().then(res => { - if (!res) { + if (!res && loginState.token) { toast.add({ title: '登录失效', description: '登录已过期,请重新登录', diff --git a/components/ModalAuthentication.vue b/components/ModalAuthentication.vue index 0460966..d26b810 100644 --- a/components/ModalAuthentication.vue +++ b/components/ModalAuthentication.vue @@ -1,6 +1,6 @@