diff --git a/src/modules/user/LoginRegisterComponent.js b/src/modules/user/LoginRegisterComponent.js index 459017d9..a379f67e 100644 --- a/src/modules/user/LoginRegisterComponent.js +++ b/src/modules/user/LoginRegisterComponent.js @@ -182,8 +182,6 @@ class LoginRegisterComponent extends Component { StudyMakeMoney = () => { // 调用父组件方法 - - // this.props.Setlogins(3); this.setState({ login: "", password: "", @@ -384,11 +382,6 @@ class LoginRegisterComponent extends Component { } - // if(response.data.profile_completed !== null || response.data.profile_completed === false){ - // this.setMyEduCoderModals(); - // return; - // } - if (response.status === 200) { if (response.data.status === 402) { window.location.href = response.data.url; @@ -458,34 +451,9 @@ class LoginRegisterComponent extends Component { password: this.state.passwords, code: this.state.codes, }).then((result) => { - 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({ - // logins: "", - // dragOk: false, - // codes: "", - // passwords: "", - // Agreetotheterms: "", - // }) - this.setMyEduCoderModals(); - } + if (result && result.data) { + this.openNotification("注册成功!"); + this.props.history.push('/'); } }).catch((error) => {