增加PRloading状态

This commit is contained in:
何童崇 2021-09-29 09:03:40 +08:00
parent 8818bafad2
commit dd62dd1704
1 changed files with 4 additions and 1 deletions

View File

@ -110,6 +110,7 @@ class NewMerge extends Component {
const { author , identifier } =oldProject;
url += `/${mergeBranch}...${author && author.login}/${identifier}:${localBranch}.json`;
}
this.setState({isSpin: true});
axios.get(url).then(result=>{
if(result){
if (result.data.status === 0) {
@ -128,7 +129,9 @@ class NewMerge extends Component {
comparesData:result.data
})
}
}).catch(error=>{})
}).catch(error=>{
this.setState({isSpin: false});
})
}
}