sujunling %!s(int64=2) %!d(string=hai) anos
pai
achega
3cf5b16e80
Modificáronse 2 ficheiros con 2 adicións e 6 borrados
  1. 1 2
      src/api/sys/gis.ts
  2. 1 4
      src/utils/http/axios/index.ts

+ 1 - 2
src/api/sys/gis.ts

@@ -22,8 +22,7 @@ enum Api {
   Login = '/callProvider',
 }
 
-const locationType = { gis: true };
-
+const locationType = { apiUrl2: true };
 /**
  * @description: user login api
  */

+ 1 - 4
src/utils/http/axios/index.ts

@@ -96,14 +96,11 @@ const transform: AxiosTransform = {
   requestInterceptors: (config, options) => {
     // 请求之前处理config
     const token = getJwtToken();
-    if (token && (config as Recordable)?.requestOptions?.withToken !== false && config.url != "/agent/callProvider") {
+    if (token && (config as Recordable)?.requestOptions?.withToken !== false) {
       // jwt token
       // config.headers['X-Authorization'] = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token;
       config.headers['Authorization'] = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token;
     }
-    if (config.url == "/api/callProvider") {
-      // config.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
-    }
     return config;
   },