diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index cf78d97e0..e580e7cce 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -745,7 +745,7 @@ class LoginDialog 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/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?

this.hideweixinlogin()}>返回登录注册

:""} 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 {
{list.map((item,key)=>{ - + if(item.en_type!="qq"){ return(
@@ -258,9 +258,9 @@ class AccountSecure extends Component {
{item.en_type!="qq"? this.showModal("wechat"):() => this.undologin("wechat",item.id) - } + onClick={ + item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id) + } >{item.id===null?"绑定":"解绑"}: this.openqqlogin():() => this.openphoneqqlogin():() => this.undologin("qq",item.id) @@ -271,6 +271,7 @@ class AccountSecure extends Component {
) + } }) } @@ -297,7 +298,7 @@ class AccountSecure 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&state=account#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=account,${window.location.host}#wechat_redirect`}>

this.handleCancel()}>取消