注册成功后跳转到首页

This commit is contained in:
caishi 2021-03-31 15:13:32 +08:00
parent 6a588db7f6
commit c256887132
1 changed files with 3 additions and 35 deletions

View File

@ -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) => {