add blank judgement; fixed setstate in render bug
This commit is contained in:
@@ -36,10 +36,16 @@ export default class InformPage extends Component {
|
||||
}
|
||||
onSubmit() {
|
||||
this.setState({
|
||||
isLoading: true,
|
||||
isDisable: true,
|
||||
});
|
||||
console.log(this.state.name, this.state.phone);
|
||||
if (this.state.name == '' || this.state.phone == '') {
|
||||
Taro.atMessage({
|
||||
message: pt.get().button.submitText.blank,
|
||||
type: 'error',
|
||||
});
|
||||
return;
|
||||
}
|
||||
updateUserInfo(this);
|
||||
setTimeout(() => {
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user