From 425c19f3ea1ae9841b0055ff737996c2f4dbbf99 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 16:30:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/FindPasswordComponent.js | 5 +-- .../modules/user/LoginRegisterComponent.js | 34 ++++++++++--------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 41b8ec464..8dea3e521 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -279,7 +279,8 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); + this.openNotification("验证码已发送,请注意查收!",2); }).catch((error) => { @@ -370,7 +371,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotco && Phonenumberisnotco != "" ?
- {Phonenumberisnotco} + {Phonenumberisnotco}
: } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index d314effca..38ecbac45 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -361,11 +361,11 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); }).catch((error) => { - console.log(error); + // console.log(error); // this.setState({ // login:"", // logins:"", @@ -374,7 +374,6 @@ class LoginRegisterComponent extends Component { } //短信验证 SMSverification = () => { - var url = `/accounts/get_verification_code.json`; axios.get((url), { params: { @@ -383,7 +382,8 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); + this.openNotification("验证码已发送,请注意查收!",2); }).catch((error) => { @@ -412,7 +412,6 @@ class LoginRegisterComponent extends Component { //倒计时 getverificationcode = () => { - debugger if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { if (this.state.logins&&this.state.logins.length === 0) { this.openNotification("请输入手机号或邮箱",2); @@ -509,13 +508,17 @@ class LoginRegisterComponent extends Component { this.setState({ tab:e.key }) - // console.log(e.key); - // if(e.key === 0){ - // this.props.Setlogins(1); - // }else{ - // this.props.Setlogins(2); - // - // } + console.log(e.key); + if(e.key === 0){ + this.setState({ + Phonenumberisnotcos:undefined + }) + }else{ + this.setState({ + Phonenumberisnotco:undefined + }) + + } // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) @@ -590,12 +593,13 @@ class LoginRegisterComponent extends Component { onChange={this.loginInputonChange} name="username" className="font-14 color-grey-9" + onBlur={(e) => this.inputOnBlur(e, 1)} style={{marginTop: '30px', height: '38px'}}> { Phonenumberisnotco && Phonenumberisnotco != "" ?- {Phonenumberisnotco} + {Phonenumberisnotco}
: } @@ -629,9 +633,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotcos && Phonenumberisnotcos != "" ?- {/*{Phonenumberisnotcos}*/} - - 请输入手机号码 + {Phonenumberisnotcos}
: