From 6964ac9b97979942ec58a17deea93962d6bc83d1 Mon Sep 17 00:00:00 2001 From: Maikiwi <74925636+maikirakiwi@users.noreply.github.com> Date: Sun, 15 Oct 2023 04:13:50 -0700 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E4=BA=86=E4=B8=80=E4=BA=9Bfeature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webui/src/hooks/useAppInfo.ts | 4 ++-- webui/src/store/log.ts | 4 ++-- webui/src/utils/axios.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/webui/src/hooks/useAppInfo.ts b/webui/src/hooks/useAppInfo.ts index 6bbba953..0c533d03 100644 --- a/webui/src/hooks/useAppInfo.ts +++ b/webui/src/hooks/useAppInfo.ts @@ -1,5 +1,5 @@ export const useAppInfo = createSharedComposable(() => { - const { auth } = useAuth(); + const { isLoggedin } = useAuth(); const running = ref(false); const version = ref(''); @@ -11,7 +11,7 @@ export const useAppInfo = createSharedComposable(() => { version.value = res.version; }); - if (auth.value !== '') { + if (isLoggedin.value !== false) { execute(); } } diff --git a/webui/src/store/log.ts b/webui/src/store/log.ts index b1fe8566..d08a9eaf 100644 --- a/webui/src/store/log.ts +++ b/webui/src/store/log.ts @@ -1,6 +1,6 @@ export const useLogStore = defineStore('log', () => { const log = ref(''); - const { auth } = useAuth(); + const { isLoggedin } = useAuth(); const message = useMessage(); function get() { @@ -10,7 +10,7 @@ export const useLogStore = defineStore('log', () => { log.value = value; }); - if (auth.value !== '') { + if (isLoggedin.value !== false) { execute(); } } diff --git a/webui/src/utils/axios.ts b/webui/src/utils/axios.ts index 4aab6a80..01de5600 100644 --- a/webui/src/utils/axios.ts +++ b/webui/src/utils/axios.ts @@ -35,8 +35,8 @@ axios.interceptors.response.use( /** token 过期 */ if (error.status === 401) { - const { auth } = useAuth(); - auth.value = ''; + const { isLoggedin } = useAuth(); + isLoggedin.value = false; } /** 执行失败 */