|
@@ -23,8 +23,12 @@ export function getRedirectURL (force, code) {
|
23
|
23
|
|
24
|
24
|
if (force || wxfirst || !code || code === originCode) {
|
25
|
25
|
const origin = location.origin + location.pathname
|
26
|
|
- const searchStr = location.search.replace(/code\=[^&]+/, '').replace(/state\=[^&]+/, '').replace(/^&+/, '').replace(/\?+$/, '')
|
27
|
|
- const local = encodeURIComponent(origin + searchStr + location.hash)
|
28
|
|
- return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd3bab568bc42d1de&redirect_uri=${local}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
|
|
26
|
+ const searchStr = location.search.replace(/code\=[^&]+/, '').replace(/state\=[^&]+/, '').replace(/^&+/g, '').replace(/\?+$/, '')
|
|
27
|
+ const local = origin + searchStr + location.hash
|
|
28
|
+ console.log('--------------------->')
|
|
29
|
+ console.log(JSON.stringify(location))
|
|
30
|
+ console.log(local)
|
|
31
|
+ console.log('--------------------->')
|
|
32
|
+ return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd3bab568bc42d1de&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
|
29
|
33
|
}
|
30
|
34
|
}
|