🔨 登录失败提示.

This commit is contained in:
lijiahangmax
2025-10-04 21:31:03 +08:00
parent 86abf4f634
commit 29e6db75ca

View File

@@ -2,6 +2,7 @@ import type { RouteLocationRaw, Router } from 'vue-router';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import { useUserStore } from '@/store'; import { useUserStore } from '@/store';
import { isLogin } from '@/utils/auth'; import { isLogin } from '@/utils/auth';
import { Message } from '@arco-design/web-vue';
import { LOGIN_ROUTE_NAME, UPDATE_PASSWORD_ROUTE_NAME } from '@/router/constants'; import { LOGIN_ROUTE_NAME, UPDATE_PASSWORD_ROUTE_NAME } from '@/router/constants';
/** /**
@@ -30,6 +31,7 @@ export default function setupUserLoginInfoGuard(router: Router) {
next(); next();
} }
} catch (error) { } catch (error) {
Message.error('获取用户信息失败');
// 获取失败退出登录 // 获取失败退出登录
await userStore.logout(); await userStore.logout();
next({ next({