|
@@ -148,7 +148,7 @@ export default {
|
|
|
return;
|
|
|
} */
|
|
|
// 初始化微信
|
|
|
- initWxJsSdkConfig(['chooseWXPay']);
|
|
|
+ initWxJsSdkConfig(['chooseWXPay', 'scanQRCode', 'checkJsApi']);
|
|
|
// 如果用户不选择登录,则不走登录逻辑
|
|
|
this.isInit = true;
|
|
|
this.$router.replace({
|
|
@@ -230,6 +230,7 @@ export default {
|
|
|
// 当判断缓存中存在 pageId, token,并且地址栏中不存在 pageId, token。我们需要刷新页面,确保用户在微信小程序和H5公众号中使用的 open ID 保存一致
|
|
|
if (
|
|
|
uni.getStorageSync('pageId') &&
|
|
|
+ uni.getStorageSync('pageId') !== 'undefined' &&
|
|
|
uni.getStorageSync('token') &&
|
|
|
(!query?.pageId || !query.token)
|
|
|
) {
|
|
@@ -407,7 +408,7 @@ export default {
|
|
|
timestamp: res.data.data.timestamp, // 必填,生成签名的时间戳
|
|
|
nonceStr: res.data.data.nonceStr, // 必填,生成签名的随机串
|
|
|
signature: res.data.data.signature, // 必填,签名
|
|
|
- jsApiList: ['chooseWXPay'], // 必填,需要使用的JS接口列表
|
|
|
+ jsApiList: ['chooseWXPay', 'scanQRCode', 'checkJsApi'], // 必填,需要使用的JS接口列表
|
|
|
});
|
|
|
self.$wx.ready(function () {
|
|
|
self.$wx.checkJsApi({
|