From d9eb84eafc0015339743b8096ac249a9fec77e76 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 18 Jul 2019 14:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=8F=E9=AA=8C=E5=80=BC=E4=B8=8D=E5=A4=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/game.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/game.rb b/app/models/game.rb index 88d636998..f1f2a09b4 100644 --- a/app/models/game.rb +++ b/app/models/game.rb @@ -61,7 +61,7 @@ class Game < ApplicationRecord if self.status == 2 # 通关了则取实际得分,没通关则取总分 gold = (shixun_status <= 1) ? 0 : self.final_score.to_i # 只要过关了,查看了答案经验值就是0;通关前查看了答案金final_score为负数 - experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : challenge.score.to_i + experience = (shixun_status <= 1 || self.final_score.to_i < 0) ? 0 : challenge.final_score.to_i else gold = challenge.score.to_i experience = gold