Commit 2a6ff46a4e2c6ebb7b5e68161c54703fe1c2f172

Authored by 刘淇
1 parent b3b129d1

授权方式修改

src/components/dynCodePay.vue
@@ -110,7 +110,7 @@ export default { @@ -110,7 +110,7 @@ export default {
110 var code = this.getUrlParam('code'); 110 var code = this.getUrlParam('code');
111 var local = window.location.href; 111 var local = window.location.href;
112 if (code == null || code === '') { 112 if (code == null || code === '') {
113 - 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' 113 + 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'
114 } else { 114 } else {
115 return code; 115 return code;
116 } 116 }
src/components/orderPay.vue
@@ -83,7 +83,7 @@ export default { @@ -83,7 +83,7 @@ export default {
83 var code = this.getUrlParam('code'); 83 var code = this.getUrlParam('code');
84 var local = window.location.href; 84 var local = window.location.href;
85 if (code == null || code === '') { 85 if (code == null || code === '') {
86 - 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' 86 + 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'
87 } else { 87 } else {
88 return code; 88 return code;
89 } 89 }
src/components/pay.vue
@@ -121,7 +121,7 @@ export default { @@ -121,7 +121,7 @@ export default {
121 var code = this.getUrlParam('code'); 121 var code = this.getUrlParam('code');
122 var local = window.location.href; 122 var local = window.location.href;
123 if (code == null || code === '') { 123 if (code == null || code === '') {
124 - 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' 124 + 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'
125 } else { 125 } else {
126 return code; 126 return code;
127 } 127 }