From 768ff5869927eab9c8873ef45e77d7fd2fd27dba Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 16 Jul 2019 11:08:00 +0800 Subject: [PATCH] this.props.fetchRepositoryCode(props, null, null, true) --- public/react/src/modules/page/MainContentContainer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index daa4b65b6..c343efcf2 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -337,12 +337,16 @@ class MainContentContainer extends Component { this.oldGameIdentifier = null; return; } + // 重试调用的这个 this.props.fetchRepositoryCode(this.props, null, null, true) setTimeout(() => { this.fetchRepositoryCode(props, arg_path, type, 1) }, 1500); } } - }else{ + } else if (fetchRepositoryCodeResponse.data.status === -4) { + // 异常 直接重试 + this.fetchRepositoryCode(props, null, null, true) + } else{ this.setState({ isEditablePath, currentPath: path }); this.oldRepositoryCode = fetchRepositoryCodeResponse.data.content || ''; this.updateRepositoryCode(this.oldRepositoryCode, updateCodeMirror)