Commit 99bfe356 by FE

Merge branch '00-formal'

parents 18db72bb 28d5b8c6
......@@ -91,7 +91,16 @@ class ToGroup extends Component {
const {isBuy = false, data = {}} = this.state;
const {user, history, location} = this.props;
if (user.hasError) {
history.push('/passport', {from: location})
if (browser.isWeixin) {
let redirectURI = window.location.href
if (redirectURI.includes('code=') && redirectURI.includes('state=STATE')) {
let index = redirectURI.lastIndexOf('code=');
redirectURI = redirectURI.substr(0, index - 1);
}
window.location.assign(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(redirectURI)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`)
} else {
history.push('/passport', {from: location})
}
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment