Commit 473d9043 authored by strong's avatar strong

Merge branch 'remould_0303_new_plate' into SANDBOX

parents 692a6efe 3efedaa2
...@@ -193,7 +193,7 @@ exports.getMessages= function(conditions, status, pageNo, pageSize, callback) { ...@@ -193,7 +193,7 @@ exports.getMessages= function(conditions, status, pageNo, pageSize, callback) {
} }
} }
var total = messages.length; 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); var limit = total - skip > pageSize ? pageSize : (total - skip);
//获取分页后的数组 //获取分页后的数组
messages = messages.slice(skip,limit); 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