查看成绩,关卡耗时错误

dev_haigong
cxt 6 years ago
parent 6411e81440
commit de3c5e6d42

@ -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

@ -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 %>

Loading…
Cancel
Save