fix: 优化登录相关权限问题 添加按键权限判断

This commit is contained in:
ZhuRui
2026-08-05 15:30:09 +08:00
parent 503ee266b0
commit 73d4d8fd34
18 changed files with 283 additions and 95 deletions
+2 -4
View File
@@ -1,4 +1,4 @@
import { auth } from '@/hooks/';
import { auth, forceReLogin } from '@/hooks/';
import { message } from 'ant-design-vue';
const baseUrl = import.meta.env?.VITE_API_BASE_URL || '';
@@ -8,9 +8,7 @@ const activeControllers = new Set<AbortController>();
/** 统一处理 401 未授权逻辑 */
const handleUnauthorized = (msg?: string) => {
auth.logout();
message.error(msg || '登录状态已过期,请重新登录');
window.location.href = '/login';
forceReLogin(msg || '登录状态已过期,请重新登录');
};
const request = (