修复新评论接口分页参数问题 #962

This commit is contained in:
binaryify
2020-10-07 12:59:09 +08:00
parent ac6bf92b64
commit 5f61cdfe4c
3 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,8 @@ module.exports = (query, request) => {
pageNo,
showInner: query.showInner || true,
pageSize,
cursor: (pageNo - 1) * pageSize,
cursor:
+query.sortType === 3 ? query.cursor || '0' : (pageNo - 1) * pageSize,
sortType: query.sortType || 1, //1:按推荐排序,2:按热度排序,3:按时间排序
}
return request(