|
@@ -4,14 +4,7 @@ const appid = APPID
|
4
|
4
|
|
5
|
5
|
export default function(path) {
|
6
|
6
|
|
7
|
|
- console.log(window.location,'window.location')
|
8
|
|
- const redirect_uri = `${window.location.origin}/#/${window.location.hash}`
|
9
|
|
-
|
10
|
|
-
|
11
|
|
-// window.location.origin = `${window.location.protocol}//${Taro.Current.router.path
|
12
|
|
-// window.location.hostname
|
13
|
|
-// }${window.location.port ? ':' + window.location.port : ''}`;
|
14
|
|
- console.log(APPID,redirect_uri,'')
|
|
7
|
+ const redirect_uri = `${window.location.origin}${window.location.pathname}#/${window.location.hash}`
|
15
|
8
|
|
16
|
9
|
const url=`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(redirect_uri)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|
17
|
10
|
return url
|