@ -270,6 +270,7 @@ class GamesController < ApplicationController
if @game.status == 2
@game.update_attributes!(:answer_open => @answer.level)
else
# 扣除总分计算
answer_deduction = challenge.challenge_answers.where("level <= #{@answer.level}").sum(:score)
@game.update_attributes!(:answer_open => @answer.level, :answer_deduction => answer_deduction)
end
@ -117,6 +117,7 @@ Rails.application.routes.draw do
get :close_webssh
get :get_answer_info
get :unlock_answer
get :check_test_sets
collection do