Commit ff0887c5 by xuzhenghua

砍价

parent 5b695bbd
...@@ -130,7 +130,9 @@ class BargainMiddlePage extends Component { ...@@ -130,7 +130,9 @@ class BargainMiddlePage extends Component {
list: res.data.data.list, list: res.data.data.list,
outList: newList outList: newList
}) })
} else { } else if(res.data.code == 4030 || res.data.code == 4040) {
}
else {
Toast.info(res.data.msg, 2) Toast.info(res.data.msg, 2)
} }
}) })
...@@ -263,7 +265,17 @@ class BargainMiddlePage extends Component { ...@@ -263,7 +265,17 @@ class BargainMiddlePage extends Component {
} else if(res.data.code == 4030 || res.data.code == 4040){ } else if(res.data.code == 4030 || res.data.code == 4040){
this.props.history.push('/passport') 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 {
this.props.history.push('/passport')
}
} else { } else {
Toast.info(res.data.msg, 2) Toast.info(res.data.msg, 2)
} }
......
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