Browse Source

Merge branch 'aaa' of https://gogs.zfire.top/linwenxin/jsm-mall-h5-front

# Conflicts:
#	src/common/http/index.js
linwenxin 1 month ago
parent
commit
fd5051c14a
2 changed files with 7 additions and 1 deletions
  1. 6 0
      src/common/http/index.js
  2. 1 1
      src/common/utils/util.js

+ 6 - 0
src/common/http/index.js

@@ -92,6 +92,9 @@ export const $http = (url, method, data, json, loadingBool = false, isExecute =
         return Promise.reject(new Error(res.message || 'Error'))
       }
       if (res.code === 4444) {
+        // #ifdef H5
+        uni.removeStorageSync(`APPID${getQueryVariable('appid')}_token`)
+        // #endif
         webLogin(true)
         return {}
       }
@@ -303,6 +306,9 @@ export const axios = function (obj = {}) {
           }
 
           if (res.code === 4444) {
+            // #ifdef H5
+            uni.removeStorageSync(`APPID${getQueryVariable('appid')}_token`)
+            // #endif
             webLogin(true)
             reject(new Error(res.message || 'Error'))
             return {}

+ 1 - 1
src/common/utils/util.js

@@ -910,7 +910,7 @@ export const onBridgeReady = function (data, successful, cancel, failure) {
     {
       // 以下6个支付参数通过蓝兔支付的jsapi接口获取
       // **************************
-      appId: store.state.user.appId, //公众号appid
+      appId: getQueryVariable('appid') || getQueryVariable('appId') || '', //公众号appid
       timeStamp: data.timeStamp, //时间戳
       nonceStr: data.nonceStr, //随机字符串
       package: data.payPackage || data.package, //订单详情扩展字符串