refactor: 去掉是否登录无用逻辑
This commit is contained in:
parent
dbbac51244
commit
4acb1026b0
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue