refactor: 去掉是否登录无用逻辑

This commit is contained in:
RubyLiu 2023-08-23 14:35:27 +08:00 committed by 刘瑞斌
parent dbbac51244
commit 4acb1026b0
2 changed files with 2 additions and 8 deletions

View File

@ -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();
});
</script>

View File

@ -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;
}
},
},