dev_forum
杨树林 5 years ago
parent ae1b31263c
commit 9aab1bd63d

@ -13,6 +13,7 @@ import axios from 'axios';
import './LoginDialog.css'; import './LoginDialog.css';
import { broadcastChannelPostMessage } from 'educoder' import { broadcastChannelPostMessage } from 'educoder'
import Notcompletedysl from "../user/Notcompletedysl";
const $ = window.$; const $ = window.$;
var wait = 60; var wait = 60;
@ -100,6 +101,7 @@ class LoginDialog extends Component {
authCodeType:true, authCodeType:true,
authCodeclass:'log-botton mt5', authCodeclass:'log-botton mt5',
isRender: false, isRender: false,
MyEduCoderModals:false,
}; };
} }
@ -365,10 +367,11 @@ class LoginDialog extends Component {
description:response.data.message, description:response.data.message,
}); });
}else{ }else{
if(response.data.identity === null || response.data.identity === undefined){ if(response.data.profile_completed !== null || response.data.profile_completed === false){
this.props.history.push("/interesse"); this.setMyEduCoderModals();
return; return;
} }
broadcastChannelPostMessage('refreshPage') broadcastChannelPostMessage('refreshPage')
this.setState({ this.setState({
isRender:false isRender:false
@ -388,17 +391,28 @@ class LoginDialog extends Component {
console.log(error) console.log(error)
}) })
} };
setNotcompleteds=()=>{
this.setState({
Notcompleteds:true,
MyEduCoderModals:false
})
};
setMyEduCoderModals=()=>{
this.setState({
MyEduCoderModals:true
})
};
onKeydowns=(e)=>{ onKeydowns=(e)=>{
let {disabled}=this.state; let {disabled}=this.state;
if( disabled===false&& e.keyCode === 13){ if( disabled===false&& e.keyCode === 13){
this.loginEDU() this.loginEDU()
console.log(1) console.log(1)
} }
} };
getloginurl=(url)=>{ getloginurl=(url)=>{
window.location.href = url; window.location.href = url;
} };
render() { render() {
let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass, let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,
dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state; dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state;
@ -414,6 +428,10 @@ class LoginDialog extends Component {
disableBackdropClick={true} disableBackdropClick={true}
onClose={() => this.handleDialogClose()} onClose={() => this.handleDialogClose()}
> >
<Notcompletedysl
modalsType={this.state.MyEduCoderModals}
setNotcompleteds={()=>{this.setNotcompleteds()}}
/>
{isRender===true? {isRender===true?
<div className={dialogBox}> <div className={dialogBox}>
<div id="closeIcon" onClick={()=>{this.handleDialogClose()}}> <div id="closeIcon" onClick={()=>{this.handleDialogClose()}}>

@ -340,8 +340,8 @@ class LoginRegisterComponent extends Component {
} }
if(response.data.identity === null || response.data.identity === undefined){ if(response.data.profile_completed !== null || response.data.profile_completed === false){
this.props.history.push("/interesse"); this.setMyEduCoderModals();
return; return;
} }

Loading…
Cancel
Save