|
|
|
|
41
|
},
|
41
|
},
|
42
|
getCode: (appid) => {
|
42
|
getCode: (appid) => {
|
43
|
wechatConfig.appid = appid
|
43
|
wechatConfig.appid = appid
|
44
|
- let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(window.location.href)}&response_type=${wechatConfig.response_type}&scope=${wechatConfig.scope}&state=${wechatConfig.state}#wechat_redirect`
|
|
|
|
|
44
|
+ const refer = window.encodeURIComponent(window.location.href.replace(/code=[^?&=]+/, '').replace(/state=[^?&=]+/, '').replace('?&', '?'))
|
|
|
45
|
+ let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${refer}&response_type=${wechatConfig.response_type}&scope=${wechatConfig.scope}&state=${wechatConfig.state}#wechat_redirect`
|
45
|
window.location.href = url
|
46
|
window.location.href = url
|
46
|
},
|
47
|
},
|
47
|
upload (item) {
|
48
|
upload (item) {
|