Browse Source

no message

aXin-0810 1 week ago
parent
commit
0c62b054ee
1 changed files with 8 additions and 6 deletions
  1. 8 6
      src/common/utils/util.js

+ 8 - 6
src/common/utils/util.js

@@ -974,7 +974,7 @@ var jishu = 0
 // 微信授权验证配置
 export const wxConfig = function (configInfo, userInfo, cb, _url) {
   let url = ''
-  const systemInfo = uni.getSystemInfoSync()
+  let systemInfo = uni.getSystemInfoSync()
   if (_url) {
     url = _url
   } else if (systemInfo.platform === 'ios') {
@@ -1036,25 +1036,27 @@ export const wxConfig = function (configInfo, userInfo, cb, _url) {
         })
 
         wx.error(function (res) {
-          if (jishu < 30) {
+          if (jishu < 60) {
             jishu++
             setTimeout(function () {
               wxConfig(
                 configInfo,
                 userInfo,
                 cb,
-                jishu % 3 === 0
+                jishu % 4 === 0
                   ? window.location.href.split('#')[0]
-                  : jishu % 3 === 1
+                  : jishu % 4 === 1
                   ? getStorage('realAuthUrl')
-                  : `${process.env.VUE_APP_HREF}/pages/index/index?appid=${
+                  : jishu % 4 === 2
+                  ? `${process.env.VUE_APP_HREF}/pages/index/index?appid=${
                       getQueryVariable('appid') || getQueryVariable('appId')
                     }`
+                  : process.env.VUE_APP_HREF
               )
             }, 1000)
           } else {
             cb?.()
-            alert('微信API签名失败v1:' + systemInfo.platform + '---' + res.errMsg) //wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
+            alert(`【机型:${systemInfo.platform}】微信API签名失败v1:${res.errMsg}`) //wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
           }
         })
       } else {