diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 68a01d383..04cfa2e25 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -539,7 +539,7 @@ class LoginDialog extends Component { } openphoneqqlogin=()=>{ - window.location.href=`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code` + window.open(`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`) } hideweixinlogin=()=>{ diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 3e5731c69..a41c15cc0 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -908,7 +908,7 @@ class LoginRegisterComponent extends Component { } openphoneqqlogin=()=>{ - window.location.href=`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code` + window.open(`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`) } render() { const { diff --git a/public/react/src/modules/user/account/AccountBinding.js b/public/react/src/modules/user/account/AccountBinding.js index 62c946040..a1ad75d28 100644 --- a/public/react/src/modules/user/account/AccountBinding.js +++ b/public/react/src/modules/user/account/AccountBinding.js @@ -12,7 +12,17 @@ class AccountSecure extends Component { super(props) this.state = { Modalstype:false, - isphone:false + isphone:false, + list:[{ + en_type: "qq", + id: null, + nickname: "", + }, + { + en_type: "wechat", + id: null, + nickname: "", + }] } } IsPC=()=>{ @@ -31,9 +41,30 @@ class AccountSecure extends Component { } componentDidMount() { let flag = this.IsPC(); //true为PC端,false为手机端 + let {basicInfo}=this.props; + let {list}=this.state; this.setState({ isphone: flag }) + let newlist=list; + + if(basicInfo===undefined||JSON.stringify(basicInfo) == "{}"||basicInfo&&basicInfo.open_users.length===0){ + + }else{ + basicInfo&&basicInfo.open_users.map((item,key)=>{ + newlist.map((items,keys)=>{ + if(item.en_type===items.en_type){ + items.id=item.id; + items.nickname=item.nickname; + } + }) + }) + } + + this.setState({ + list:newlist + }) + } showModal=()=>{ this.setState({ @@ -88,11 +119,11 @@ class AccountSecure extends Component { } openphoneqqlogin=()=>{ - window.location.href=`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code` + window.open(`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`) } render() { let {basicInfo}=this.props; - + let {list}=this.state; return (