tangning 3 months ago
parent
commit
7d52a9ff48
2 changed files with 13 additions and 7 deletions
  1. 12 6
      src/request/index.ts
  2. 1 1
      src/view/case/draw/selectMapImage.vue

+ 12 - 6
src/request/index.ts

@@ -36,13 +36,19 @@ let getAuth: AuthHook = () => ({ token: "", userId: "0", clear: () => {} });
 axios.defaults.baseURL = baseURL;
 
 axios.interceptors.request.use(async (config) => {
+  console.log('config.params', config.params);
   if (config.method === "get" && config.params) {
-    for (const key in config.params) {
-      const val = config.params[key];
-      if (typeof val === "string" && !!val) {
-        config.params[key] = val.replaceAll(/[\[\]]/g, "").trim();
-      }
-    }
+    // for (const key in config.params) {
+    //   const val = config.params[key];
+    //   console.log('config.params', key, val);
+    //   try {
+    //     if (typeof val === "string" && !!val) {
+    //       config.params[key] = val.replaceAll(/[\[\]]/g, "").trim();
+    //     }
+    //   } catch (error) {
+    //     config.params[key] = val;
+    //   }
+    // }
   }
 
   if (!config.url) {

+ 1 - 1
src/view/case/draw/selectMapImage.vue

@@ -283,7 +283,7 @@ const onSearch = (val) => {
   getTipsList(val).then((res) => {
     keywordList.value = res.data;
   });
-  console.log("onSearch", val, "keyword.value", keyword.value);
+  console.log("onSearch11", val, "keyword.value", keyword.value);
 };
 const hanleItem = (name) => {
   // keyword.value = item.name;