修改获取用户信息相关代码逻辑

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-07-17 14:42:33 +08:00
parent 183714a830
commit 86da12a344

View File

@@ -211,7 +211,7 @@ export default {
if(!code){
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + response.content.appid + '&redirect_uri=' + encodeURIComponent(location.href + '?orderNo=' + orderNo) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
}else{
window.location.href = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' + response.content.appid + '&secret=' + response.content.appsecret + '&code=' + code + '&grant_type=authorization_code'
}
}
})