diff --git a/public/react/config-overrides.js b/public/react/config-overrides.js index 7a91afb73..6cd6ec806 100644 --- a/public/react/config-overrides.js +++ b/public/react/config-overrides.js @@ -73,11 +73,4 @@ module.exports = override( }), addWebpackPlugin(new MonacoWebpackPlugin({})), // addWebpackPlugin(instance), - (config) => { - config.resolve.plugins = config.resolve.plugins.filter(plugin => !(plugin instanceof ModuleScopePlugin)); - if (process.env.NODE_ENV !== "development") { - config.output.publicPath = `/react/build/`; - } - return config - } ); \ No newline at end of file diff --git a/public/react/src/App.js b/public/react/src/App.js index 7dcc982d4..76808b192 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -556,9 +556,6 @@ class App extends Component { - {/**/} - {/**/} - () diff --git a/public/react/src/modules/page/Header.js b/public/react/src/modules/page/Header.js index 9af8b6e68..73f766cf3 100644 --- a/public/react/src/modules/page/Header.js +++ b/public/react/src/modules/page/Header.js @@ -28,11 +28,7 @@ class Header extends Component { } goBack() { - const { challenge, game, shixun } = this.props - // myshixuns/pw346iskxh/stages/rw4v6giml5no - // http://localhost:3000/shixuns/cz7yw3en/challenges - const url = `/shixuns/${shixun.identifier}/challenges` - window.location.href = url; + this.props.history.goBack() } diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index e4a0b1750..29d707f27 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -545,15 +545,6 @@ class MainContentContainer extends Component { } // ---------------------- 以下是编程题处理 ---------------------- - console.log('onRunCodeTest onRunCodeTest') - - // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/file_update?path=src%2Fstep6%2FLinkedList.java - - - // var url = `${locationPath}/file_update?path=${encodeURIComponent(challenge.path)}` - - // var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数 - this.setEvaluateMiddleStatusText('') this.setState({ @@ -670,20 +661,6 @@ class MainContentContainer extends Component { }, intervalDuring) window.gameStatusIntervalId = gameStatusIntervalId; - // } else if(ableToCreate === 0) { // 排队等待,重新执行gameBuild - // const mintes = parseInt((waitNum * 120) / 60); // 等待时间 = 等待人数 * (15(秒)---3分钟的随机数); - // tipContent(ableToCreate, waitNum, mintes, waitNum * 180, first); - // setTimeout(()=>{ - // this.gameBuild(fileUpdateResponse, first + 1) - // }, 10000) - // this.setGameBuildFalse() - // } else if(ableToCreate == -1) { // 排队人数过多,建议先玩下一关 - // tipContent(ableToCreate, waitNum, 0, 0, first); - // this.setGameBuildFalse() - // } else { - // showSnackbar("实训云平台繁忙(繁忙等级:94),请稍后刷新并重试") - // this.setGameBuildFalse() - // } }).catch((gameBuildError) => { diff --git a/public/react/src/modules/page/main/ChooseRepositoryView.js b/public/react/src/modules/page/main/ChooseRepositoryView.js index 3f25e9dfa..dd43d0e98 100644 --- a/public/react/src/modules/page/main/ChooseRepositoryView.js +++ b/public/react/src/modules/page/main/ChooseRepositoryView.js @@ -101,27 +101,14 @@ class ChooseRepositoryView extends Component { item.challenge_question.map((optionItem, optionIndex) => { const isSelected = fVal[index] === optionValueArray[optionIndex] - // test optionItem.option_name = '
11
11
12' // '1\r\n2\r\n3\r\n' const showText = this._toHtml(optionItem.option_name) - /* -
-
- - */ ar.push( } label={
diff --git a/public/react/src/modules/tpm/TPMIndex.js b/public/react/src/modules/tpm/TPMIndex.js index 3d3fc2462..c1af6a18f 100644 --- a/public/react/src/modules/tpm/TPMIndex.js +++ b/public/react/src/modules/tpm/TPMIndex.js @@ -135,24 +135,6 @@ class TPMIndex extends Component { let getnewTPMsettings = this.props.user && this.props.user.user_id + 'newTPMsettings'; let newTPMsettings = window.localStorage.getItem(getnewTPMsettings) let id = this.props.match.params.shixunId; - // console.log('props', this.props); - // let collaborators = `/shixuns/` + id + `/propaedeutics.json`; - // - // axios.get(collaborators).then((response) => { - // if (response.status === 200) { - // if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { - // - // }else{ - // this.setState({ - // PropaedeuticsList: response.data, - // shixunId: id - // }); - // } - // - // } - // }).catch((error) => { - // console.log(error) - // }); let Url = `/shixuns/` + id + `.json`; axios.get(Url).then((response) => { if (response.status === 200) { @@ -385,21 +367,6 @@ class TPMIndex extends Component { {this.state.is_jupyter === false ? 排行榜 : ""} - {/*{this.state.identity >4||this.state.identity===undefined ? "":this.state.openknows===true?*/} - {/* */} - {/*
更多设置在这里,点击“配置”看一看~
*/} - {/*
*/} - {/* */} - {/* }*/} - {/* trigger="click"*/} - {/* placement="top"*/} - {/* visible={this.state.openknows}*/} - {/* >*/} - {/* */} - {/*
:""}*/} - {this.state.identity > 4 || this.state.identity === undefined ? "" : 配置 @@ -417,14 +384,6 @@ class TPMIndex extends Component {
- {/*筛选*/} - {/*{*/} - {/* tpmindexjupyterbool===false?*/} - - {/* :""*/} - {/*}*/} - {/* */} -