this.props.fetchRepositoryCode(props, null, null, true)

dev_forum
hjm 5 years ago
parent 94446c536f
commit 768ff58699

@ -337,12 +337,16 @@ class MainContentContainer extends Component {
this.oldGameIdentifier = null; this.oldGameIdentifier = null;
return; return;
} }
// 重试调用的这个 this.props.fetchRepositoryCode(this.props, null, null, true)
setTimeout(() => { setTimeout(() => {
this.fetchRepositoryCode(props, arg_path, type, 1) this.fetchRepositoryCode(props, arg_path, type, 1)
}, 1500); }, 1500);
} }
} }
}else{ } else if (fetchRepositoryCodeResponse.data.status === -4) {
// 异常 直接重试
this.fetchRepositoryCode(props, null, null, true)
} else{
this.setState({ isEditablePath, currentPath: path }); this.setState({ isEditablePath, currentPath: path });
this.oldRepositoryCode = fetchRepositoryCodeResponse.data.content || ''; this.oldRepositoryCode = fetchRepositoryCodeResponse.data.content || '';
this.updateRepositoryCode(this.oldRepositoryCode, updateCodeMirror) this.updateRepositoryCode(this.oldRepositoryCode, updateCodeMirror)

Loading…
Cancel
Save