From b3e125c35268a324547970088a172fe109c586c3 Mon Sep 17 00:00:00 2001 From: Folltoshe Date: Fri, 28 Apr 2023 19:51:17 +0800 Subject: [PATCH] fix --- src/renderer/utils/musicSdk/wy/comment.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/renderer/utils/musicSdk/wy/comment.js b/src/renderer/utils/musicSdk/wy/comment.js index 5ea7954b..f7879267 100644 --- a/src/renderer/utils/musicSdk/wy/comment.js +++ b/src/renderer/utils/musicSdk/wy/comment.js @@ -147,24 +147,20 @@ export default { cursorTools.setCursor(songmid, body.data.cursor, cursorInfo.orderType, cursorInfo.offset, page) return { source: 'wy', comments: this.filterComment(body.data.comments), total: body.data.totalCount, page, limit, maxPage: Math.ceil(body.data.totalCount / limit) || 1 } }, - async getHotComment({ songmid }, page = 1, limit = 10) { - // 这个API每次最多获取10个 - if (limit > 10) limit = 10 + async getHotComment({ songmid }, page = 1, limit = 20) { const id = idPrefix + songmid if (this._requestObj2) this._requestObj2.cancelHttp() const _requestObj2 = httpFetch(`https://music.163.com/weapi/v1/resource/hotcomments/${id}`, { method: 'POST', headers: { - 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36', - origin: 'https://music.163.com', Refere: 'http://music.163.com/', }, form: weapi({ rid: id, beforeTime: Date.now().toString(), offset: page === 1 ? 0 : (page - 1) * limit, - pageSize: limit, + limit, }), })