|
|
|
@ -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 (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="basicForm settingForm">
|
|
|
|
@ -177,14 +208,8 @@ class AccountSecure extends Component {
|
|
|
|
|
<div className="title">绑定登录账号</div>
|
|
|
|
|
|
|
|
|
|
<Form>
|
|
|
|
|
{/*
|
|
|
|
|
en_type: "qq"
|
|
|
|
|
id: 60
|
|
|
|
|
nickname: "Sum"
|
|
|
|
|
*/}
|
|
|
|
|
{basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0?"":
|
|
|
|
|
|
|
|
|
|
basicInfo&&basicInfo.open_users.map((item,key)=>{
|
|
|
|
|
{list.map((item,key)=>{
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div className="flexTable" key={key}>
|
|
|
|
|