qq登录流程恢复

sso
杨树明 5 years ago
parent 6bbbec3956
commit ad99a3c594

@ -66,12 +66,19 @@ const EducoderLogin = Loadable({
loading: Loading,
})
//微信登录
const Otherlogin=Loadable({
loader: () => import('./modules/login/Otherlogin'),
loading: Loading,
})
//微信登录
const Loginqq=Loadable({
loader: () => import('./modules/login/Loginqq'),
loading: Loading,
})
const Otherloginstart=Loadable({
loader: () => import('./modules/login/Otherloginstart'),
@ -632,6 +639,10 @@ class App extends Component {
<Route
path="/otherlogin" component={Otherlogin}
/>
<Route
path="/loginqq" component={Loginqq}
/>
<Route path="/users/:username"
render={
(props) => {

@ -50,7 +50,7 @@ var newContainer={
paddingTop: "40px",
}
class Otherlogin extends Component {
class Loginqq extends Component {
constructor(props) {
super(props);
this.state={
@ -289,4 +289,4 @@ class Otherlogin extends Component {
}
export default Otherlogin;
export default Loginqq;

@ -47,3 +47,8 @@
width: 100%;
margin-top: 25px;
}
.weixinmarauto{
width: 24%;
margin: 0 auto;
}

@ -244,7 +244,7 @@ class Otherlogin extends Component {
placeholder="输入密码,注意区分大小写"
></Input.Password>
</Content>
{this.state.logintypes==="username"?<span className={"color-red ml50"}>请填写账号</span>:this.state.logintypes==="password"?<span className={"color-red ml50"}></span>:""}
{this.state.logintypes==="username"?<span className={"color-red ml50 weixinmarauto"}>请填写账号</span>:this.state.logintypes==="password"?<span className={"color-red ml50 weixinmarauto"}></span>:""}
<Footer className={"weixinfooter mt30"}>
<Button className="login_btn font-16 wechattiyan" type="primary" style={{height:"46px"}} onClick={() => this.postwechatlogin(false,this.state.login,this.state.password)}
size={"large"}>绑定</Button>

@ -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])}`;
}
}
}

@ -168,11 +168,7 @@ class sendPanel extends Component{
let{sentShixunPath,sendToCourseList,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;
return(
<div>
<style>{`
body{
overflow:hidden!important;
}
`}</style>
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}
@ -201,6 +197,11 @@ class sendPanel extends Component{
destroyOnClose={true}
>
<div className="newupload_conbox">
<style>{`
body{
overflow:hidden!important;
}
`}</style>
<div className="mb20"
// onMouseLeave={this.closeList}
>

Loading…
Cancel
Save