diff --git a/public/react/src/modules/login/Otherloginstart.js b/public/react/src/modules/login/Otherloginstart.js index 9901fc8ad..b549fdeae 100644 --- a/public/react/src/modules/login/Otherloginstart.js +++ b/public/react/src/modules/login/Otherloginstart.js @@ -8,10 +8,12 @@ class Otherloginstart extends Component { componentDidMount() { let query=this.props.location.search; - debugger + if(query!= ""){ const type = query.split('?code='); const types = type[1].split('&state='); + const typeshref = types[1].split(','); + let codeurl = `/auth/wechat/callback.json` axios.get(codeurl,{params:{ code:types[0] @@ -19,13 +21,13 @@ class Otherloginstart extends Component { if(result){ if(result.data.status===0){ if(result.data.new_user===true){ - window.location.href="/otherlogin?type=wechat" + window.location.href=`https://${typeshref[1]}/otherlogin?type=wechat`; }else{ // this.getinfo() - if(types[1]==="account"){ - window.location.href="/account/binding" + if(typeshref[1]==="account"){ + window.location.href=`https://${typeshref[1]}/account/binding`; }else{ - window.location.href="/" + window.location.href=`https://${typeshref[1]}`; } } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 41954a3fb..3090dc0dc 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -1293,7 +1293,7 @@ class LoginRegisterComponent extends Component { frameBorder="0" sandbox="allow-scripts allow-same-origin allow-top-navigation" scrolling="no" - src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}>:""} + src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}>:""} {weixinlogin===true?
:""} diff --git a/public/react/src/modules/user/account/AccountBinding.js b/public/react/src/modules/user/account/AccountBinding.js index c1974a746..24032e84e 100644 --- a/public/react/src/modules/user/account/AccountBinding.js +++ b/public/react/src/modules/user/account/AccountBinding.js @@ -242,7 +242,7 @@ class AccountSecure extends Component {