@ -5,7 +5,8 @@ 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]
@ -194,6 +195,6 @@ class EcloudController < ApplicationController
render :json => {code: 501, msg: "sign的值错误"}
return
end
@ -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
time
@ -55,7 +55,7 @@
<tr>
<td>第<%= index + 1 %>关</td>
<td class="<%= game.status == 2 && game.end_time > @homework.end_time ? 'color-red' : '' %>"><%= game.status == 2 ? format_time(game.end_time) : '- -' %></td>
<td><%= game.status == 2 ? game_spend_time(game.end_time.to_i - game.open_time.to_i) : '- -' %></td>
<td><%= game.consumes_time %></td>
<td><%= game.status == 2 ? (game.final_score < 0 ? 0 : cha.score) : '- -' %></td>
</tr>
<% end %>