window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=
(這個(gè)appid后端會(huì)給你)&redirect_uri=http://192.168什么什么的/pages/index/index(這里的地址填寫自己本地的,注意是否是hash模式公荧,#不能用)&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'