|
|
@ -61,7 +61,7 @@ class Game < ApplicationRecord
|
|
|
|
if self.status == 2 # 通关了则取实际得分,没通关则取总分
|
|
|
|
if self.status == 2 # 通关了则取实际得分,没通关则取总分
|
|
|
|
gold = (shixun_status <= 1) ? 0 : self.final_score.to_i
|
|
|
|
gold = (shixun_status <= 1) ? 0 : self.final_score.to_i
|
|
|
|
# 只要过关了,查看了答案经验值就是0;通关前查看了答案金final_score为负数
|
|
|
|
# 只要过关了,查看了答案经验值就是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
|
|
|
|
else
|
|
|
|
gold = challenge.score.to_i
|
|
|
|
gold = challenge.score.to_i
|
|
|
|
experience = gold
|
|
|
|
experience = gold
|
|
|
|