mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
修复新版评论返回参数错误问题 #1393
This commit is contained in:
+20
-3
@@ -7,14 +7,31 @@ module.exports = (query, request) => {
|
||||
const threadId = query.type + query.id
|
||||
const pageSize = query.pageSize || 20
|
||||
const pageNo = query.pageNo || 1
|
||||
let sortType = Number(query.sortType) || 99
|
||||
if (sortType === 1) {
|
||||
sortType = 99
|
||||
}
|
||||
let cursor = ''
|
||||
switch (sortType) {
|
||||
case 99:
|
||||
cursor = (pageNo - 1) * pageSize
|
||||
break
|
||||
case 2:
|
||||
cursor = 'normalHot#' + (pageNo - 1) * pageSize
|
||||
break
|
||||
case 3:
|
||||
cursor = query.cursor || '0'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
const data = {
|
||||
threadId: threadId,
|
||||
pageNo,
|
||||
showInner: query.showInner || true,
|
||||
pageSize,
|
||||
cursor:
|
||||
+query.sortType === 3 ? query.cursor || '0' : (pageNo - 1) * pageSize,
|
||||
sortType: query.sortType || 1, //1:按推荐排序,2:按热度排序,3:按时间排序
|
||||
cursor: cursor,
|
||||
sortType: sortType, //99:按推荐排序,2:按热度排序,3:按时间排序
|
||||
}
|
||||
return request(
|
||||
'POST',
|
||||
|
||||
Reference in New Issue
Block a user