Explorar o código

502异常处理

Michael Wang %!s(int64=6) %!d(string=hai) anos
pai
achega
90132961cc
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      src/utils/axios.js

+ 7 - 0
src/utils/axios.js

@@ -82,6 +82,13 @@ qmInstance.interceptors.response.use(
       wk_token = null;
       router.push("/login/" + localStorage.getItem("domain"));
       return; // 仅显示登录失效,不显示因登录失效造成的后续错误
+    } else if (status == 502) {
+      Message.error({
+        content: "服务器异常(502)!",
+        duration: 15,
+        closable: true
+      });
+      return;
     } else if (status != 200) {
       if (
         wk_token &&