diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js
index c03d49351..601c002a9 100644
--- a/public/react/src/modules/page/MainContent.js
+++ b/public/react/src/modules/page/MainContent.js
@@ -114,7 +114,7 @@ class MainContent extends Component {
?
readRepoTimeout === true ?
:
diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js
index d24a5cefb..a437391d6 100644
--- a/public/react/src/modules/page/MainContentContainer.js
+++ b/public/react/src/modules/page/MainContentContainer.js
@@ -235,7 +235,7 @@ class MainContentContainer extends Component {
}
// arg_path 点击文件目录树时,传入的点击节点对应的path
- fetchRepositoryCode( props, arg_path, type, isRetry) {
+ fetchRepositoryCode( props, arg_path, type, isRetry, retryAndRefresh) {
const { challenge, showSnackbar, game, shixun, myshixun, hide_code } = props ? props : this.props;
if (shixun.vnc == true) {
// vnc模式下不需要加载代码
@@ -293,6 +293,10 @@ class MainContentContainer extends Component {
// that._cancel = c;
// })
}).then((fetchRepositoryCodeResponse) => {
+ if (retryAndRefresh && fetchRepositoryCodeResponse.data.content) {
+ window.location.reload()
+ return;
+ }
// 空字符串还是正常切换
if (fetchRepositoryCodeResponse.data.status == 0) {
readingRepoTimes = readingRepoTimes + 1;