diff --git a/public/react/src/modules/login/Otherloginqq.js b/public/react/src/modules/login/Otherloginqq.js index 5a03a0fbb..18ae57d7c 100644 --- a/public/react/src/modules/login/Otherloginqq.js +++ b/public/react/src/modules/login/Otherloginqq.js @@ -12,6 +12,12 @@ 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], @@ -20,13 +26,13 @@ class Otherloginqq extends Component { if(result){ if(result.data.status===0){ if(result.data.new_user===true){ - window.location.href=`https://${decodeURIComponent(typeshref[1])}/otherlogin?type=qq`; + this.props.history.replace(`/otherlogin?type=qq`); }else{ // this.getinfo() if(typeshref[0]==="account"){ - window.location.href=`https://${decodeURIComponent(typeshref[1])}/account/binding`; + this.props.history.replace(`/account/binding`); }else{ - window.location.href=`https://${decodeURIComponent(typeshref[1])}`; + this.props.history.replace(`/`); } } } diff --git a/public/react/src/modules/login/Otherloginstart.js b/public/react/src/modules/login/Otherloginstart.js index 216e3f073..93d202ce1 100644 --- a/public/react/src/modules/login/Otherloginstart.js +++ b/public/react/src/modules/login/Otherloginstart.js @@ -14,6 +14,11 @@ class Otherloginstart extends Component { const types = type[1].split('&state='); const typeshref = types[1].split(','); + if(typeshref[1]==="test-newweb.educoder.net"){ + window.location.href=`https://${typeshref[1]}/otherloginstart?code=${types[0]}&state=null,""`; + }else if(typeshref[1]==="pre-newweb.educoder.net"){ + window.location.href=`https://${typeshref[1]}/otherloginstart?code=${types[0]}&state=null,""`; + } let codeurl = `/auth/wechat/callback.json` axios.get(codeurl,{params:{ code:types[0] @@ -21,13 +26,13 @@ class Otherloginstart extends Component { if(result){ if(result.data.status===0){ if(result.data.new_user===true){ - window.location.href=`https://${typeshref[1]}/otherlogin?type=wechat`; + this.props.history.replace(`/otherlogin?type=wechat`); }else{ // this.getinfo() if(typeshref[0]==="account"){ - window.location.href=`https://${typeshref[1]}/account/binding`; + this.props.history.replace(`/account/binding`); }else{ - window.location.href=`https://${typeshref[1]}`; + this.props.history.replace(`/`); } } diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js index 5e90c1f3d..ccf22057f 100644 --- a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js +++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js @@ -1,6 +1,6 @@ import React, {Component} from 'react'; -import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from 'antd'; +import {Input, Select, Radio,Button, Badge, message, Modal,Tooltip} from 'antd'; import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; @@ -183,7 +183,7 @@ export default class TpmQuestionEdit extends Component { /> {/*+ 添加*/} -