diff --git a/publish/changeLog.md b/publish/changeLog.md index 6ae76c2c..504687ef 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,7 @@ +### 新增 + +- 新增各大平台歌单热门标签显示(显示在歌单界面的第一个下拉标签菜单中) + ### 优化 - 减淡各个主题的歌曲列表分隔线颜色 diff --git a/src/renderer/utils/music/kg/songList.js b/src/renderer/utils/music/kg/songList.js index 65c4e728..1f85c709 100644 --- a/src/renderer/utils/music/kg/songList.js +++ b/src/renderer/utils/music/kg/songList.js @@ -67,6 +67,7 @@ export default { result.push({ id: tag.id, name: tag.special_name, + source: 'kg', }) } return result @@ -95,7 +96,7 @@ export default { this.getSongListUrl(sortId, tagId, page), ) return this._requestObj_list.promise.then(({ body }) => { - if (body.status !== 1) return this.getSongList(sortId, tagId, page, ++tryNum) + if (!body || body.status !== 1) return this.getSongList(sortId, tagId, page, ++tryNum) return this.filterList(body.special_db) }) }, diff --git a/src/renderer/utils/music/tx/songList.js b/src/renderer/utils/music/tx/songList.js index 8cdd6b52..6cafc2ac 100644 --- a/src/renderer/utils/music/tx/songList.js +++ b/src/renderer/utils/music/tx/songList.js @@ -261,7 +261,7 @@ export default { }) }, getTags() { - return Promise.all([this.getTag(), this.getHotTag()]).then(([tags, hotTag]) => ({ tags, hotTag })) + return Promise.all([this.getTag(), this.getHotTag()]).then(([tags, hotTag]) => ({ tags, hotTag, source: 'tx' })) }, } diff --git a/src/renderer/views/SongList.vue b/src/renderer/views/SongList.vue index d5b36d88..a41596ae 100644 --- a/src/renderer/views/SongList.vue +++ b/src/renderer/views/SongList.vue @@ -96,7 +96,8 @@ export default { return this.setting.apiSource == 'temp' }, tagList() { - return this.tags[this.source] ? this.tags[this.source].tags : [] + let tagInfo = this.tags[this.source] + return tagInfo ? [{ name: '热门标签', list: [...tagInfo.hotTag] }, ...tagInfo.tags] : [] }, }, watch: {