update
This commit is contained in:
+3
-1
@@ -6,6 +6,7 @@ import { TOKEN_KEY } from '/@/enum/cacheEnum.ts';
|
||||
import { useMessage } from '/@/hooks/web/useMessage.ts';
|
||||
import { checkStatus } from '/@/api/checkStatus.ts';
|
||||
import router from '/@/router';
|
||||
import { getBaseLogin } from '/@/enum/pageEnum.ts';
|
||||
|
||||
const { createMessage, createErrorModal } = useMessage();
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
@@ -32,8 +33,9 @@ service.interceptors.response.use(
|
||||
if (error.response) {
|
||||
switch (error.response.data.code) {
|
||||
case 401:
|
||||
let path = getBaseLogin();
|
||||
router.replace({
|
||||
path: '/login',
|
||||
path: path,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user