| | |
| | | // 调起授权,获取code。注意:每次调用时先清除已储存的token,避免后续跳转监听到旧的token,一直401 |
| | | const url = window.location.href; |
| | | const routeCode = url.split("#")[1]; |
| | | if (routeCode == '/weChatLogin' || routeCode == '/selectLoginMethod') { |
| | | if (routeCode == 'weChatLogin' || routeCode == '/selectLoginMethod') { |
| | | window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wxAppId}&redirect_uri=${encodeURIComponent( |
| | | 'https://www.tepcb.com/mobile/teachingService/#/mine' |
| | | 'https://www.tepcb.com/mobile/textbooks/#/personalCenter' |
| | | )}&response_type=code&scope=snsapi_userinfo&state=${state}`; |
| | | } else { |
| | | window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wxAppId}&redirect_uri=${encodeURIComponent( |