From 361647cf2341fba9c4857d534e349e5a796683e9 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 19 Nov 2019 11:07:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=97=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index d4275b600..58ab09820 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -767,8 +767,8 @@ class GamesController < ApplicationController # 记录实训花费的时间 # REDO:需要添加详细的说明 def cost_time - return if @game.status >= 2 - cost_time = Time.now.to_i - @game.close_browse_time.to_i + #return if @game.status >= 2 + cost_time = (Time.now.to_i - @game.close_browse_time.to_i) + @game.cost_time.to_i @game.update_attributes(close_browse_time: Time.now, cost_time: cost_time) end