Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/user/FindPasswordComponent.js
dev_forum
杨树明 5 years ago
commit 0833558951

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

@ -298,6 +298,9 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcosyzm:"验证码不正确", Phonenumberisnotcosyzm:"验证码不正确",
}) })
return;
}else {
this.openNotification(result.data.message);
return; return;
} }
}else { }else {

Loading…
Cancel
Save