Explorar o código

去除浏览器信息

zhengnaiwen_citu hai 4 meses
pai
achega
436c85bdff
Modificáronse 2 ficheiros con 4 adicións e 6 borrados
  1. 3 3
      src/config/axios/service.js
  2. 1 3
      src/utils/openEncryption.js

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

@@ -120,7 +120,7 @@ service.interceptors.request.use(
        * content
        */
       const env = import.meta.env.VITE_USER_NODE_ENV
-      console.log(env)
+      // console.log(env)
       if (env === 'production' && systemInfo.beijingTimestamp === 0) {
         const _timestamp = await getBeijingTimestamp()
         setBeijingTimestamp(_timestamp)
@@ -140,8 +140,8 @@ service.interceptors.request.use(
         body,
         raw,
         noSign,
-        config,
-        browserInfo: getBrowserInfo()
+        config
+        // browserInfo: getBrowserInfo()
       }
       errorData.push({
         time: header.timestamp,

+ 1 - 3
src/utils/openEncryption.js

@@ -38,10 +38,8 @@ export const encryptionFun = ({raw, body, appId, AppSecret, timestamp}) => {
   if (body && Object.keys(body).length) {
     str += decodeURIComponent(JSON.stringify(body))
   }
-  const noSign = str + paramsStr
   return {
     ...initSign,
-    noSign: noSign,
-    sign: sha256(noSign)
+    sign: sha256(str + paramsStr)
   }
 }