parent
716b5af39f
commit
b6ccd6562c
@ -1,26 +1,18 @@
|
||||
index = 0
|
||||
json.status 3
|
||||
# st: 0 实践题 1 选择题
|
||||
if @challenge.st == 0
|
||||
json.message do
|
||||
json.array! @challenge_answers do |answer|
|
||||
index += 1
|
||||
json.answer_id answer.id
|
||||
json.answer_name answer.name
|
||||
json.answer_score answer.score
|
||||
# 高层级不给答案
|
||||
if @power || @game.answer_open >= index
|
||||
json.answer_contents answer.contents
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
json.message do
|
||||
json.array! @challenge_answers do |answer|
|
||||
json.position answer[:postion]
|
||||
json.answer_contents answer[:answer]
|
||||
json.message do
|
||||
json.array! @challenge_answers do |answer|
|
||||
index += 1
|
||||
json.answer_id answer.id
|
||||
json.answer_name answer.name
|
||||
json.answer_score answer.score
|
||||
# 高层级不给答案
|
||||
if @power || @game.answer_open >= index
|
||||
json.answer_contents answer.contents
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
@ -1 +1,5 @@
|
||||
json.contents @answer.contents
|
||||
if @challenge.st == 0
|
||||
json.contents @answer.contents
|
||||
else
|
||||
json.contents @answer
|
||||
end
|
||||
|
Loading…
Reference in new issue