diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index c93e4c2ca..3031dccbc 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -156,12 +156,13 @@ class GamesController < ApplicationController shixun_tomcat = Redmine::Configuration['shixun_tomcat'] uri = "#{shixun_tomcat}/bridge/game/getWaitingTime" params = {:tpiID => "#{@myshixun.id}"} + resubmit = @_params['resubmit'] res = uri_exec uri, params if (res && res['code'] != 0) @message = "实训云平台繁忙(繁忙等级:94)" raise("实训云平台繁忙(繁忙等级:94)") end - render :json => {:result => "success", :onRun => res['onRun'], :waitNum => res['waitNum'], :waitingTime => res['waitingTime'] } + render :json => {:result => "success", :onRun => res['onRun'], :waitNum => res['waitNum'], :waitingTime => res['waitingTime'], :resubmit => resubmit } #render :json => {:result => "success", :onRun => 1, :waitNum => 12, :waitingTime => 546 } rescue Exception => e render :json => {:result => "failed"} diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb index 9044a7fa0..c1bd54ac9 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -180,6 +180,7 @@ timeID = setInterval(function(){ $.ajax({ url: '<%= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>', + data:{resubmit:data.resubmit}, async: false, success: function(data){ console.log(data);