From 4acb1026b0142c228ed4cd5f1b395be48fd6999c Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Wed, 23 Aug 2023 14:35:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8E=BB=E6=8E=89=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E7=99=BB=E5=BD=95=E6=97=A0=E7=94=A8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.vue | 8 ++------ frontend/src/store/modules/user/index.ts | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 5e02fe1dbb..d81fd929c0 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -68,11 +68,7 @@ console.log(error); } }); - onMounted(async () => { - const res = await userStore.isLogin(); - if (!res) { - const router = useRouter(); - router.push({ name: 'login' }); - } + onMounted(() => { + userStore.isLogin(); }); diff --git a/frontend/src/store/modules/user/index.ts b/frontend/src/store/modules/user/index.ts index 4cd7d87268..cde7085be6 100644 --- a/frontend/src/store/modules/user/index.ts +++ b/frontend/src/store/modules/user/index.ts @@ -103,12 +103,10 @@ const useUserStore = defineStore('user', { if (appStore.currentOrgId === '') { appStore.setCurrentOrgId(res.lastOrganizationId || ''); } - return true; } catch (err) { const { t } = useI18n(); Message.error(t('message.loginExpired')); this.logoutCallBack(); - return false; } }, },