shaogen1995 2 vuotta sitten
vanhempi
commit
446adb8c8b
2 muutettua tiedostoa jossa 3 lisäystä ja 4 poistoa
  1. 2 1
      houtai/src/pages/Login/index.tsx
  2. 1 3
      houtai/src/utils/http.ts

+ 2 - 1
houtai/src/pages/Login/index.tsx

@@ -40,7 +40,8 @@ export default function Login() {
       // 用户信息存到本地
       setTokenInfo(res.data);
       history.push("/");
-    }
+    } else if (res.code === 3014)
+      MessageFu.warning("用户名不存在或密码错误,请联系管理员!");
   };
 
   return (

+ 1 - 3
houtai/src/utils/http.ts

@@ -68,9 +68,7 @@ http.interceptors.response.use(
       }, 200);
     } else if (response.data.code === 0) {
       // MessageFu.success(response.data.msg);
-    } else if (response.data.code === 3014)
-      MessageFu.warning("用户名不存在或密码错误,请联系管理员!");
-    else MessageFu.warning(response.data.msg);
+    } else MessageFu.warning(response.data.msg);
 
     // 上传成功之后更改  取消上传 的状态
     if (store.getState().loginStore.closeUpFile.state)