From 4ff94ee3b543961c905c7f060376941b520d8423 Mon Sep 17 00:00:00 2001 From: liugongyu <290219706@qq.com> Date: Tue, 16 Aug 2022 15:27:49 +0800 Subject: [PATCH] 静默授权 --- src/components/dynCodePay.vue | 2 +- src/components/orderPay.vue | 2 +- src/components/pay.vue | 2 +- src/components/plateNumber.vue | 2 +- src/utils/request.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/dynCodePay.vue b/src/components/dynCodePay.vue index 32dadef..82d79a8 100644 --- a/src/components/dynCodePay.vue +++ b/src/components/dynCodePay.vue @@ -110,7 +110,7 @@ export default { var code = this.getUrlParam('code'); var local = window.location.href; if (code == null || code === '') { - window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect' + window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect' } else { return code; } diff --git a/src/components/orderPay.vue b/src/components/orderPay.vue index 344539f..30c4864 100644 --- a/src/components/orderPay.vue +++ b/src/components/orderPay.vue @@ -83,7 +83,7 @@ export default { var code = this.getUrlParam('code'); var local = window.location.href; if (code == null || code === '') { - window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect' + window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect' } else { return code; } diff --git a/src/components/pay.vue b/src/components/pay.vue index 3bb11d3..7cb8298 100644 --- a/src/components/pay.vue +++ b/src/components/pay.vue @@ -121,7 +121,7 @@ export default { var code = this.getUrlParam('code'); var local = window.location.href; if (code == null || code === '') { - window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect' + window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appID + '&redirect_uri=' + encodeURIComponent(local) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect' } else { return code; } diff --git a/src/components/plateNumber.vue b/src/components/plateNumber.vue index f1c3560..2aeb764 100644 --- a/src/components/plateNumber.vue +++ b/src/components/plateNumber.vue @@ -320,7 +320,7 @@ export default { var code = this.getUrlParam('code'); var local = window.location.href; if (code == null || code === '') { - window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appID+'&redirect_uri='+encodeURIComponent(local)+'&response_type=code&scope=snsapi_userinfo&state=1,0#wechat_redirect' + window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appID+'&redirect_uri='+encodeURIComponent(local)+'&response_type=code&scope=snsapi_base&state=1,0#wechat_redirect' } else { return code; } diff --git a/src/utils/request.js b/src/utils/request.js index 83aee69..edeb2ff 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -10,7 +10,7 @@ const service = axios.create({ // https://dev.renniting.cn/pay/ 赤峰农行测试环境 - baseURL: 'https://dev.renniting.cn/pay/', // url = base url + request url + baseURL: 'https://pay.renniting.cn/', // url = base url + request url // withCredentials: true, // send cookies when cross-domain requests timeout: 6000 // request timeout }) -- libgit2 0.21.4