|
|
|
@ -160,14 +160,14 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
if (this.state.Phonenumberisnotcobool === false) {
|
|
|
|
|
if (this.state.login.length === 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:"请输入正确的手机号或邮箱",
|
|
|
|
|
Phonenumberisnotco:"请输入正确的邮箱或手机号",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (this.state.login === undefined|| this.state.login.length ===0 || this.state.login === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotco:"请输入登录手机号码或邮箱",
|
|
|
|
|
Phonenumberisnotco:"请输入正确的邮箱或手机号",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -180,23 +180,23 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}
|
|
|
|
|
if (this.state.password === undefined || this.state.password.length ===0 || this.state.password === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcosmmm:"请输入密码",
|
|
|
|
|
Phonenumberisnotcosmmm:"密码不能为空",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.state.passwords === undefined || this.state.passwords.length ===0 || this.state.passwords === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcosymmmm:"请输入二次密码"
|
|
|
|
|
Phonenumberisnotcosymmmm:"二次密码不能为空"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.state.password !== this.state.passwords==="") {
|
|
|
|
|
this.openNotification(`两次密码不相同`);
|
|
|
|
|
this.openNotification(`两次输入的密码不一致`);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcosyzm:"请输入验证码"
|
|
|
|
|
Phonenumberisnotcosyzm:"验证码不能为空"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -209,11 +209,30 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
// console.log(result);
|
|
|
|
|
//登录成功,会生成session
|
|
|
|
|
// this.openNotification("找回密码成功,请重新登入。");
|
|
|
|
|
// window.location.href = "/login"
|
|
|
|
|
this.setState({
|
|
|
|
|
modalsType:true
|
|
|
|
|
})
|
|
|
|
|
if(result){
|
|
|
|
|
if(result.data.status===-2){
|
|
|
|
|
if(result.data.message==="验证码不正确"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcosyzm:"验证码不正确",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}else if(result.data.message==="验证码已失效"){
|
|
|
|
|
this.setState({
|
|
|
|
|
Phonenumberisnotcosyzm:"验证码不正确",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}else {
|
|
|
|
|
this.openNotification(result.data.message);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.setState({
|
|
|
|
|
modalsType:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
@ -414,11 +433,6 @@ class LoginRegisterComponent extends Component {
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<div className="login_register_content" style={{height: "520px"}}>
|
|
|
|
|
<ReadPassword
|
|
|
|
|
modalsType={this.state.modalsType}
|
|
|
|
|
StudyMakeMoney={()=>this.StudyMakeMoney()}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<Input type="text" name="username" value={"namename"}
|
|
|
|
|
style={{height: '0', width: '0', border: 'none', display: "none"}}/>
|
|
|
|
|
<Input type="password" name="password" id="password" value={"123123123"}
|
|
|
|
|