|
|
|
@ -12,12 +12,6 @@ class Otherloginqq extends Component {
|
|
|
|
|
const type = query.split('?code=');
|
|
|
|
|
const types = type[1].split('&state=');
|
|
|
|
|
const typeshref = types[1].split('%2C');
|
|
|
|
|
|
|
|
|
|
if(decodeURIComponent(typeshref[1])==="test-newweb.educoder.net"){
|
|
|
|
|
window.location.href=`https://${decodeURIComponent(typeshref[1])}/otherloginqq?code=${types[0]}&state=null%2C`;
|
|
|
|
|
}else if(decodeURIComponent(typeshref[1])==="pre-newweb.educoder.net"){
|
|
|
|
|
window.location.href=`https://${decodeURIComponent(typeshref[1])}/otherloginqq?code=${types[0]}&state=null%2C`;
|
|
|
|
|
}
|
|
|
|
|
let codeurl = `/auth/qq/callback`;
|
|
|
|
|
axios.get(codeurl,{params:{
|
|
|
|
|
code:types[0],
|
|
|
|
@ -26,13 +20,13 @@ class Otherloginqq extends Component {
|
|
|
|
|
if(result){
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
if(result.data.new_user===true){
|
|
|
|
|
this.props.history.replace(`/otherlogin?type=qq`);
|
|
|
|
|
window.location.href=`https://${decodeURIComponent(typeshref[1])}/loginqq?type=qq`;
|
|
|
|
|
}else{
|
|
|
|
|
// this.getinfo()
|
|
|
|
|
if(typeshref[0]==="account"){
|
|
|
|
|
this.props.history.replace(`/account/binding`);
|
|
|
|
|
window.location.href=`https://${decodeURIComponent(typeshref[1])}/account/binding`;
|
|
|
|
|
}else{
|
|
|
|
|
this.props.history.replace(`/`);
|
|
|
|
|
window.location.href=`https://${decodeURIComponent(typeshref[1])}`;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|