You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
636 B
29 lines
636 B
6 years ago
|
# [
|
||
|
# {
|
||
|
# user: User,
|
||
|
# ord: 1, //名次
|
||
|
# time: '2018-01-19 22:40', //通关时间
|
||
|
# accuracy: 100, //准确率
|
||
|
# use_time: 100, //耗时,单位秒
|
||
|
# gold: 10000, //加金币
|
||
|
# }
|
||
|
# ]
|
||
|
#
|
||
|
#
|
||
|
#
|
||
|
|
||
|
|
||
|
|
||
|
i = 0
|
||
|
json.array! @myshixuns do |myshixun|
|
||
|
json.users do
|
||
|
json.image_url url_to_avatar(myshixun.user)
|
||
|
json.user_url "/users/#{myshixun['login']}"
|
||
|
json.name myshixun['lastname']
|
||
|
end
|
||
|
|
||
|
json.ord i+=1
|
||
|
json.time myshixun["updated_at"]
|
||
|
json.use_time myshixun["time"]
|
||
|
json.gold myshixun["score"].to_i < 0 ? 0 : myshixun["score"].to_i
|
||
|
end
|