From c29c8253a4e0cb8e8afeec1f03c4de93c50f86f0 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Wed, 24 Jul 2019 18:16:31 +0800
Subject: [PATCH] =?UTF-8?q?monaca=20=E9=9C=80=E8=A6=81=E5=88=B7=E6=96=B0?=
=?UTF-8?q?=EF=BC=8C=E4=B8=8D=E7=84=B6=E6=97=A0=E6=B3=95=E7=BC=96=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/page/MainContent.js | 2 +-
public/react/src/modules/page/MainContentContainer.js | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
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;