setting修改报错时要隐藏加载效果

This commit is contained in:
caishi 2021-10-14 14:28:20 +08:00
parent c0f2c77e1a
commit bb1175de01
1 changed files with 3 additions and 4 deletions

View File

@ -157,9 +157,6 @@ class Setting extends Component {
...values, ...values,
}).then((result) => { }).then((result) => {
if (result) { if (result) {
this.setState({
loading:false
})
this.props.showNotification(`仓库信息修改成功!`); this.props.showNotification(`仓库信息修改成功!`);
if(values.project_identifier !== projectsId){ if(values.project_identifier !== projectsId){
this.props.history.push(`/${owner}/${values.project_identifier}/settings`); this.props.history.push(`/${owner}/${values.project_identifier}/settings`);
@ -168,8 +165,10 @@ class Setting extends Component {
getDetail && getDetail(); getDetail && getDetail();
} }
} }
this.setState({
loading:false
})
}).catch((error) => { }).catch((error) => {
console.log(error);
this.setState({ this.setState({
loading:false loading:false
}) })