浏览代码

减少百度统计分组

Michael Wang 5 年之前
父节点
当前提交
2a0e71a759
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/utils/axios.js

+ 4 - 2
src/utils/axios.js

@@ -78,7 +78,9 @@ qmInstance.interceptors.response.use(
       let detailInfo = "";
       let detailInfo = "";
       try {
       try {
         detailInfo +=
         detailInfo +=
-          error.config.url.replace(/\d+/g, "") + " ||| " + error.message;
+          error.config.url.replace(/=\w*/g, "=").replace(/\/\d+\//g, "/{id}/") +
+          " ||| " +
+          error.message;
       } catch (error) {
       } catch (error) {
         console.log("detailInfo error");
         console.log("detailInfo error");
       }
       }
@@ -162,7 +164,7 @@ qmInstance.interceptors.response.use(
         "_trackEvent",
         "_trackEvent",
         location.pathname.replace(/\d+/g, ""),
         location.pathname.replace(/\d+/g, ""),
         "status: " + status,
         "status: " + status,
-        error.config.url.replace(/\d+/g, ""),
+        error.config.url.replace(/=\w*/g, "=").replace(/\/\d+\//g, "/{id}/"),
       ]);
       ]);
       if (
       if (
         wk_token &&
         wk_token &&