FIX 完善fork功能提示语
This commit is contained in:
parent
a017c6f84d
commit
2b658e59fa
|
@ -242,14 +242,16 @@ class Detail extends Component{
|
|||
const { project_id } = this.state;
|
||||
const url = `/projects/${project_id}/forks.json`;
|
||||
axios.post(url).then(result=>{
|
||||
if(result && result.data.status === 0){
|
||||
this.props.history.push(`/projects/${result.data.id}/coders`);
|
||||
this.props.showNotification(result.data.message);
|
||||
this.setState({
|
||||
if (result) {
|
||||
if (result.data.status === 0) {
|
||||
this.props.history.push(`/projects/${result.data.id}/coders`);
|
||||
}
|
||||
this.setState({
|
||||
isSpin:false
|
||||
})
|
||||
}else{
|
||||
this.props.showNotification(result.data.message);
|
||||
this.props.showNotification(result.data.message);
|
||||
} else {
|
||||
this.props.showNotification(`服务器开小差了`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
|
Loading…
Reference in New Issue