retryAndRefresh

dev_forum
hjm 5 years ago
parent d6ff838b0c
commit 7dd4d74b46

@ -236,6 +236,9 @@ class MainContentContainer extends Component {
// arg_path 点击文件目录树时传入的点击节点对应的path // arg_path 点击文件目录树时传入的点击节点对应的path
fetchRepositoryCode( props, arg_path, type, isRetry, retryAndRefresh) { fetchRepositoryCode( props, arg_path, type, isRetry, retryAndRefresh) {
if (retryAndRefresh) {
this.retryAndRefresh = retryAndRefresh
}
const { challenge, showSnackbar, game, shixun, myshixun, hide_code } = props ? props : this.props; const { challenge, showSnackbar, game, shixun, myshixun, hide_code } = props ? props : this.props;
if (shixun.vnc == true) { if (shixun.vnc == true) {
// vnc模式下不需要加载代码 // vnc模式下不需要加载代码
@ -294,7 +297,7 @@ class MainContentContainer extends Component {
// }) // })
}).then((fetchRepositoryCodeResponse) => { }).then((fetchRepositoryCodeResponse) => {
// monaca 需要刷新,不然无法编辑 // monaca 需要刷新,不然无法编辑
if (retryAndRefresh && fetchRepositoryCodeResponse.data.content) { if (this.retryAndRefresh && fetchRepositoryCodeResponse.data.content) {
window.location.reload() window.location.reload()
return; return;
} }

Loading…
Cancel
Save