From 7226e2817635be97ec50b6d9bef8059b45d7a9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 19 Jul 2019 22:40:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/user/FindPasswordComponent.js | 11 +++++++++++ .../react/src/modules/user/LoginRegisterComponent.js | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 0e4837dcb..d1087984d 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -193,6 +193,17 @@ class LoginRegisterComponent extends Component { this.openNotification(`两次输入的密码不一致`); return } + else if (this.state.passwords !==undefined ||this.state.passwords.length>0&&this.state.passwords.length<8){ + this.setState({ + Phonenumberisnotcosymmm:"密码不能少于8位", + }) + return + } else if (this.state.passwords !==undefined ||this.state.passwords.length>0&&this.state.passwords.length>16){ + this.setState({ + Phonenumberisnotcosymmm:"密码不能超过16位", + }) + return + } if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") { this.setState({ Phonenumberisnotcosyzm:"验证码不能为空" diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index d30d23db5..038775203 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -268,6 +268,16 @@ class LoginRegisterComponent extends Component { Phonenumberisnotcosymmm:"密码不能为空", }) return + } else if (this.state.passwords !==undefined ||this.state.passwords.length>0&&this.state.passwords.length<8){ + this.setState({ + Phonenumberisnotcosymmm:"密码不能少于8位", + }) + return + } else if (this.state.passwords !==undefined ||this.state.passwords.length>0&&this.state.passwords.length>16){ + this.setState({ + Phonenumberisnotcosymmm:"密码不能超过16位", + }) + return } else if (this.state.Agreetotheterms === false) { this.openNotification(`请同意服务协议条款`,2); return;