add blank judgement; fixed setstate in render bug

This commit is contained in:
Dawn_Ocean
2024-03-15 14:28:26 +08:00
parent 6b554196b3
commit b41498976e
8 changed files with 123 additions and 94 deletions
+7 -1
View File
@@ -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({