Commit 3efedaa2 authored by strong's avatar strong

修改获取系统消息第一页分页的问题

parent 6d59361f
......@@ -193,7 +193,7 @@ exports.getMessages= function(conditions, status, pageNo, pageSize, callback) {
}
}
var total = messages.length;
var skip = (pageNo - 1) * pageSize;
var skip = (pageNo == 0 ? 0 : (pageNo - 1)) * pageSize;
var limit = total - skip > pageSize ? pageSize : (total - skip);
//获取分页后的数组
messages = messages.slice(skip,limit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment