pre_develop
daiao 6 years ago
parent 71d2066131
commit 50e0bf1a92

@ -10,8 +10,6 @@ class CnmoocsService
where(status: 2, hidden: 0) where(status: 2, hidden: 0)
shixun_count = shixuns.count shixun_count = shixuns.count
pageCount = ((shixun_count / limit.to_f) == (shixun_count / limit)) ? (shixun_count / limit) : ((shixun_count / limit) + 1) pageCount = ((shixun_count / limit.to_f) == (shixun_count / limit)) ? (shixun_count / limit) : ((shixun_count / limit) + 1)
Rails.logger.info("#####{pageCount}")
Rails.logger.info("#####{limit}")
shixuns = shixuns.order("myshixuns_count desc").offset(offset).limit(limit) shixuns = shixuns.order("myshixuns_count desc").offset(offset).limit(limit)
shixun_list = shixun_data shixuns shixun_list = shixun_data shixuns
{error: 0, messages: "请求成功", {error: 0, messages: "请求成功",

Loading…
Cancel
Save