From 7922920f515f029c1f450215c6f2e044c605f6ba Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 20 Mar 2021 20:19:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4=E6=AF=8F?= =?UTF-8?q?=E9=A1=B5=E6=9D=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/utils/music/mg/comment.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/utils/music/mg/comment.js b/src/renderer/utils/music/mg/comment.js index a6c8a134..c3fab1a4 100644 --- a/src/renderer/utils/music/mg/comment.js +++ b/src/renderer/utils/music/mg/comment.js @@ -16,7 +16,7 @@ export default { if (!info) info = list.find(s => s.songId == songmid) return info ? info.songId : null }, - async getComment(musicInfo, page = 1, limit = 20) { + async getComment(musicInfo, page = 1, limit = 10) { if (this._requestObj) this._requestObj.cancelHttp() if (!musicInfo.songId) { let id = await this.getSongId(musicInfo) @@ -35,7 +35,7 @@ export default { if (statusCode != 200 || body.returnCode !== '000000') throw new Error('获取评论失败') return { source: 'mg', comments: this.filterComment(body.data.items), total: body.data.itemTotal, page, limit, maxPage: Math.ceil(body.data.itemTotal / limit) || 1 } }, - async getHotComment(musicInfo, page = 1, limit = 100) { + async getHotComment(musicInfo, page = 1, limit = 5) { if (this._requestObj2) this._requestObj2.cancelHttp() if (!musicInfo.songId) { @@ -55,7 +55,7 @@ export default { if (statusCode != 200 || body.returnCode !== '000000') throw new Error('获取热门评论失败') return { source: 'mg', comments: this.filterComment(body.data.items) } }, - async getReplyComment(musicInfo, replyId, page = 1, limit = 100) { + async getReplyComment(musicInfo, replyId, page = 1, limit = 10) { if (this._requestObj2) this._requestObj2.cancelHttp() const _requestObj2 = httpFetch(`https://music.migu.cn/v3/api/comment/listCommentsById?commentId=${replyId}&pageSize=${limit}&pageNo=${page}`, { @@ -75,7 +75,7 @@ export default { time: item.createTime, timeStr: dateFormat2(new Date(item.createTime).getTime()), userName: item.author.name, - avatar: item.author.avatar, + avatar: item.author.avatar && item.author.avatar.startsWith('//') ? `http:${item.author.avatar}` : item.author.avatar, userId: item.author.id, likedCount: item.praiseCount, replyNum: item.replyTotal,