fixed 后台查询打榜分和历史

This commit is contained in:
xxq250 2025-07-31 16:33:17 +08:00
parent 33442c5fca
commit 09eb876ca0
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ json.data do
json.apply_status c_user&.apply_status json.apply_status c_user&.apply_status
json.score @stage.present? ? c_user.stage_score(@stage) : c_user.score json.score @stage.present? ? c_user.stage_score(@stage) : c_user.score
json.last_score @stage.present? ? c_user.stage_last_score(@stage) : c_user.last_score json.last_score @stage.present? ? c_user.stage_last_score(@stage) : c_user.last_score
json.other_score_json c_user.stage_max_score_data["data"].present? ? c_user.stage_max_score_data["data"] : c_user.api_result_data json.other_score_json @stage.present? && c_user.stage_max_score_data(@stage)["data"].present? ? c_user.stage_max_score_data(@stage)["data"] : c_user.api_result_data
json.history_scores c_user.competition_user_scores do |user_score| json.history_scores c_user.competition_user_scores do |user_score|
json.score user_score.api_result json.score user_score.api_result
end end

View File

@ -11,6 +11,6 @@ json.data do
json.score @stage.present? ? c_user.stage_score(@stage) : c_user.score json.score @stage.present? ? c_user.stage_score(@stage) : c_user.score
json.last_score @stage.present? ? c_user.stage_last_score(@stage) : c_user.last_score json.last_score @stage.present? ? c_user.stage_last_score(@stage) : c_user.last_score
json.other_score_1 c_user.api_result_data["repeatTripleSet"].present? ? c_user.api_result_data["repeatTripleSet"] : 0 json.other_score_1 c_user.api_result_data["repeatTripleSet"].present? ? c_user.api_result_data["repeatTripleSet"] : 0
json.other_score_json c_user.stage_max_score_data["data"].present? ? c_user.stage_max_score_data["data"] : c_user.api_result_data json.other_score_json @stage.present? && c_user.stage_max_score_data(@stage)["data"].present? ? c_user.stage_max_score_data(@stage)["data"] : c_user.api_result_data
end end
end end