|
@@ -72,6 +72,12 @@ qmInstance.interceptors.response.use(
|
|
|
window.___lastNetworkError = Date.now();
|
|
|
}
|
|
|
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ location.pathname,
|
|
|
+ "网络连接异常,请检查网络设置。",
|
|
|
+ ]);
|
|
|
+
|
|
|
return Promise.reject(error);
|
|
|
}
|
|
|
// 这里是返回状态码不为200时候的错误处理
|
|
@@ -107,6 +113,12 @@ qmInstance.interceptors.response.use(
|
|
|
// router.push("/login/" + localStorage.getItem("domain"));
|
|
|
return; // 仅显示登录失效,不显示因登录失效造成的后续错误
|
|
|
} else if (status == 502) {
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ location.pathname,
|
|
|
+ "服务器异常(502)!",
|
|
|
+ error.config.url,
|
|
|
+ ]);
|
|
|
Message.error({
|
|
|
content: "服务器异常(502)!",
|
|
|
duration: 15,
|
|
@@ -114,6 +126,12 @@ qmInstance.interceptors.response.use(
|
|
|
});
|
|
|
return;
|
|
|
} else if (status == 503) {
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ location.pathname,
|
|
|
+ "服务器繁忙(503)!请稍后重试。",
|
|
|
+ error.config.url,
|
|
|
+ ]);
|
|
|
Message.error({
|
|
|
content: "服务器繁忙(503)!请稍后重试。",
|
|
|
duration: 15,
|
|
@@ -121,6 +139,12 @@ qmInstance.interceptors.response.use(
|
|
|
});
|
|
|
return;
|
|
|
} else if (status != 200) {
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ location.pathname,
|
|
|
+ "status: " + status,
|
|
|
+ error.config.url,
|
|
|
+ ]);
|
|
|
if (
|
|
|
wk_token &&
|
|
|
![401, 403].includes(status) &&
|