From c0e4b399381486c1b78606ea94a5f6b25e4e48eb Mon Sep 17 00:00:00 2001 From: binaryify Date: Thu, 26 Sep 2019 10:11:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=81=E4=BF=A1=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95=E5=88=86=E9=A1=B5=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=97=AE=E9=A2=98,=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3=20#599?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 3 +++ docs/README.md | 2 +- module/event.js | 2 +- module/msg_private_history.js | 2 +- package.json | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 42afce1..a843b3f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 3.22.4 | 2019.09.26 +- 修复私信历史记录分页参数问题,更新文档 [#599](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/599) + ### 3.22.3 | 2019.09.24 - 手机号码检测: 添加国家码作为参数,方便检测国外手机号码 [#598](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/598) diff --git a/docs/README.md b/docs/README.md index 9fe2d5f..2f138f1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2238,7 +2238,7 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **可选参数 :** `limit` : 返回数量 , 默认为 30 -`offset` : 偏移数量,用于分页 , 如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0 +`before` : 分页参数,取上一页最后一项的 `time` 获取下一页数据 **接口地址 :** `/msg/private/history` diff --git a/module/event.js b/module/event.js index 9a1daba..48fa875 100644 --- a/module/event.js +++ b/module/event.js @@ -1,7 +1,7 @@ // 动态 module.exports = (query, request) => { - const data={ + const data = { 'pagesize': query.pagesize || 20, 'lasttime': query.lasttime || -1 } diff --git a/module/msg_private_history.js b/module/msg_private_history.js index 08605c2..27ad291 100644 --- a/module/msg_private_history.js +++ b/module/msg_private_history.js @@ -3,8 +3,8 @@ module.exports = (query, request) => { const data = { userId: query.uid, - offset: query.offset || 0, limit: query.limit || 30, + time: query.before || 0, total: 'true' }; return request( diff --git a/package.json b/package.json index a8100b3..d82fff7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.22.3", + "version": "3.22.4", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js", -- GitLab