Browse Source

过期签名 失败

zhengnaiwen_citu 4 months ago
parent
commit
3819ebd239
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/config/axios/service.js

+ 4 - 4
src/config/axios/service.js

@@ -111,8 +111,8 @@ service.interceptors.request.use(
       const raw = config.url.split('?')[1]
       // const raw = config.encodeParams ? config.url.split('?')[1] : config.url.split('?')[1]
       const body = {
-        ...config.data,
-        ...config.params
+        ...typeof config.data === 'string' ? JSON.parse(config.data) : config.data,
+        ...typeof config.params === 'string' ? JSON.parse(config.params) : config.params
       }
       /**
        * header
@@ -126,7 +126,7 @@ service.interceptors.request.use(
         setBeijingTimestamp(_timestamp)
       }
       
-      const { noSign, ...header} = encryptionFun({
+      const header = encryptionFun({
         raw,
         body,
         appId: 'web_client',
@@ -139,10 +139,10 @@ service.interceptors.request.use(
         params: config.params,
         body,
         raw,
-        noSign,
         config
         // browserInfo: getBrowserInfo()
       }
+      console.log('加密参数', content)
       errorData.push({
         time: header.timestamp,
         url: config.url,