chenjun 5 сар өмнө
parent
commit
17b921ba9a

+ 1 - 1
src/utils/axiosReq2.ts

@@ -65,7 +65,7 @@ service.interceptors.response.use(
     if (successCode.includes(code)) {
       return res.data;
     } else {
-      if (code === 403) {
+      if (code === 401) {
         ElMessageBox.confirm("请重新登录", {
           confirmButtonText: "重新登录",
           cancelButtonText: "取消",

+ 1 - 1
src/utils/mockAxiosReq.ts

@@ -70,7 +70,7 @@ service.interceptors.response.use(
 
       // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
       if (!isMttoken) {
-        if (res.code == 500) {
+        if (res.code == 401) {
           // to re-login
           ElMessage({
             message: '身份令牌过期或失效,即将重新登录',