From bb170d810d30a90cfddf72d2e5fa912b5545b989 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 6 Sep 2017 17:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AF=84=E6=B5=8B=E9=80=9A?= =?UTF-8?q?=E5=85=B3=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 3 ++- app/views/games/_code_actions.html.erb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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);