From de3c5e6d42edfe8840a02d89cc6914c083ab6aab Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 13 Mar 2019 11:13:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=88=90=E7=BB=A9?= =?UTF-8?q?=EF=BC=8C=E5=85=B3=E5=8D=A1=E8=80=97=E6=97=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/myshixun.rb | 2 +- app/views/student_work/_shixun_work_show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/myshixun.rb b/app/models/myshixun.rb index 7714a8f2..774caad9 100644 --- a/app/models/myshixun.rb +++ b/app/models/myshixun.rb @@ -64,7 +64,7 @@ class Myshixun < ActiveRecord::Base time = 0 self.games.each do |game| if game.status == 2 - time += (game.end_time.to_i - game.open_time.to_i) > 0 ? (game.end_time.to_i - game.open_time.to_i) : 0 + time += game.cost_time.to_i end end time diff --git a/app/views/student_work/_shixun_work_show.html.erb b/app/views/student_work/_shixun_work_show.html.erb index 1f680aed..ee9cd765 100644 --- a/app/views/student_work/_shixun_work_show.html.erb +++ b/app/views/student_work/_shixun_work_show.html.erb @@ -55,7 +55,7 @@ 第<%= index + 1 %>关 <%= game.status == 2 ? format_time(game.end_time) : '- -' %> - <%= game.status == 2 ? game_spend_time(game.end_time.to_i - game.open_time.to_i) : '- -' %> + <%= game.consumes_time %> <%= game.status == 2 ? (game.final_score < 0 ? 0 : cha.score) : '- -' %> <% end %> From 166332c9360a6587bf2466aaf48f63e52919aa62 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 13 Mar 2019 13:54:47 +0800 Subject: [PATCH 2/2] . --- app/controllers/ecloud_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index eb81603b..f5495039 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -5,7 +5,7 @@ require 'digest' class EcloudController < ApplicationController skip_before_filter :verify_authenticity_token - before_filter :check_sign + before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update] before_filter :user_setup # before_filter :require_login, only: [:authorize] @@ -193,6 +193,6 @@ class EcloudController < ApplicationController render :json => {code: 501, msg: "sign的值错误"} return end - end + end