diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 8a2982465..509be32f3 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -26,8 +26,12 @@ class LoginRegisterComponent extends Component { seconds: 35, codes: "", getverificationcodes: true, - Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, + Phonenumberisnotco: undefined, + Phonenumberisnotcosytdhk:undefined, + Phonenumberisnotcosmmm: undefined, + Phonenumberisnotcosymmmm:undefined, + Phonenumberisnotcosyzm:undefined, s: 'text', classpass: "text", readonlyInput: true, @@ -148,29 +152,45 @@ class LoginRegisterComponent extends Component { Retrievepassword = () => { if (this.state.Phonenumberisnotcobool === false) { if (this.state.login.length === 0) { - this.openNotification("请输入正确的手机号或邮箱"); + this.setState({ + Phonenumberisnotco:"请输入正确的手机号或邮箱", + }) return } } - - if (this.state.login === undefined || this.state.login === "") { - this.openNotification(`请输入登录手机号码或邮箱`); + if (this.state.login === undefined|| this.state.login.length ===0 || this.state.login === "") { + this.setState({ + Phonenumberisnotco:"请输入登录手机号码或邮箱", + }) return } - if (this.state.password === undefined || this.state.password === "") { - this.openNotification(`请输入密码`); + if (this.state.dragOk === false) { + // this.openNotification(`请拖动滑块完成验证`,2); + this.setState({ + Phonenumberisnotcosytdhk:"请拖动滑块完成验证", + }) + return + } + if (this.state.password === undefined || this.state.password.length ===0 || this.state.password === "") { + this.setState({ + Phonenumberisnotcosmmm:"请输入密码", + }) return } - if (this.state.passwords === undefined || this.state.passwords === "") { - this.openNotification(`请输入密码`); + if (this.state.passwords === undefined || this.state.passwords.length ===0 || this.state.passwords === "") { + this.setState({ + Phonenumberisnotcosymmmm:"请输入二次密码" + }) return } - if (this.state.password !== this.state.passwords) { + if (this.state.password !== this.state.passwords==="") { this.openNotification(`两次密码不相同`); return } - if (this.state.codes === undefined || this.state.codes === "") { - this.openNotification(`请输入验证码`); + if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") { + this.setState({ + Phonenumberisnotcosyzm:"请输入验证码" + }) return } var url = "/accounts/reset_password.json"; @@ -372,6 +392,10 @@ class LoginRegisterComponent extends Component { seconds, getverificationcodes, Phonenumberisnotco, + Phonenumberisnotcosytdhk, + Phonenumberisnotcosmmm, + Phonenumberisnotcosymmmm, + Phonenumberisnotcosyzm, readonlyInput, codes, Whethertoverify, @@ -446,7 +470,7 @@ class LoginRegisterComponent extends Component { placeholder="输入注册手机号或邮箱" value={this.state.login} onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}> { - Phonenumberisnotco && Phonenumberisnotco != "" ? + Phonenumberisnotco && Phonenumberisnotco !== "" ?

{Phonenumberisnotco}

@@ -474,21 +498,41 @@ class LoginRegisterComponent extends Component { : "" } - + { + Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !=="" ? +

+ {Phonenumberisnotcosytdhk} +

+ :
+ } + { + Phonenumberisnotcosmmm && Phonenumberisnotcosmmm !== "" ? +

+ {Phonenumberisnotcosmmm} +

+ :
+ } + - -
- + {Phonenumberisnotcosymmmm} +

+ :
+ } +
+ { getverificationcodes === undefined ? - : getverificationcodes === true ? - : - @@ -516,9 +560,17 @@ class LoginRegisterComponent extends Component {
- + { + Phonenumberisnotcosyzm && Phonenumberisnotcosyzm !== "" ? +

+ {Phonenumberisnotcosyzm} +

+ :
+ } + +