|
|
|
@ -587,7 +587,7 @@ class MainContentContainer extends Component {
|
|
|
|
|
|
|
|
|
|
// var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setEvaluateMiddleStatusText('')
|
|
|
|
|
this.setState({
|
|
|
|
|
gameBuilding: true
|
|
|
|
|
})
|
|
|
|
@ -611,6 +611,9 @@ class MainContentContainer extends Component {
|
|
|
|
|
this.setGameBuildFalse()
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
setEvaluateMiddleStatusText = (msg) => {
|
|
|
|
|
window.$('#evaluateMiddleStatusText').html(msg)
|
|
|
|
|
}
|
|
|
|
|
// 之前的task_commit方法
|
|
|
|
|
gameBuild(fileUpdateResponse, first) {
|
|
|
|
|
const { st, challenge, output_sets, onRunCodeTestFinish, showSnackbar, time_limit } = this.props
|
|
|
|
@ -642,15 +645,16 @@ class MainContentContainer extends Component {
|
|
|
|
|
withCredentials: true,
|
|
|
|
|
}).then((gameStatusResponse) => {
|
|
|
|
|
requestTimes++;
|
|
|
|
|
if(!gameStatusResponse.data) {
|
|
|
|
|
if(requestTimes >= timeOut - 1){ // 最后一次参数改为true
|
|
|
|
|
if(!gameStatusResponse.data || gameStatusResponse.data.statusMessage
|
|
|
|
|
&& gameStatusResponse.data.messageStatus ) {
|
|
|
|
|
if(requestTimes >= timeOut - 1) { // 最后一次参数改为true
|
|
|
|
|
timeOutFlag = true;
|
|
|
|
|
}
|
|
|
|
|
if (gameStatusResponse.data.statusMessage) {
|
|
|
|
|
this.setEvaluateMiddleStatusText(gameStatusResponse.data.statusMessage)
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (gameStatusResponse.data.message) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const { status } = gameStatusResponse.data;
|
|
|
|
|
|
|
|
|
|
if (timeOutFlag === false && (status === 2 || status === 0)) {
|
|
|
|
|