dev_forum
ysl 6 years ago
parent 1a9984fb4b
commit 66e4a5522b

@ -212,8 +212,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: undefined, Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true, Phonenumberisnotcobool: true,
}) })
this.Emailphonenumberverification(value, id)
} }
this.Emailphonenumberverification(value, id)
return return
} }
@ -222,8 +222,11 @@ class LoginRegisterComponent extends Component {
stringdata = "邮箱格式不正确"; stringdata = "邮箱格式不正确";
} else { } else {
stringdata = "手机号格式不正确"; stringdata = "手机号格式不正确";
if (!regph.test(value)) {
} // 这里先判断是不是手机号然后在判断是不是邮箱然后又判断是不是手机号,如果不是手机号就是账号
stringdata=undefined;
}
}
if (id === 1) { if (id === 1) {
this.setState({ this.setState({
Phonenumberisnotco: stringdata, Phonenumberisnotco: stringdata,
@ -234,8 +237,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: stringdata, Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
}) })
this.Emailphonenumberverification(value, id)
} }
this.Emailphonenumberverification(value, id)
return return
} else { } else {
if (id === 1) { if (id === 1) {
@ -248,8 +251,8 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcos: undefined, Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: true, Phonenumberisnotcobool: true,
}) })
this.Emailphonenumberverification(value, id)
} }
this.Emailphonenumberverification(value, id)
return return
} }
} }

Loading…
Cancel
Save