新增各大平台歌单热门标签显示

pull/166/head
lyswhut 2019-12-31 16:12:46 +08:00
parent 529078dc67
commit 0228850d6d
4 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
### 新增
- 新增各大平台歌单热门标签显示(显示在歌单界面的第一个下拉标签菜单中)
### 优化 ### 优化
- 减淡各个主题的歌曲列表分隔线颜色 - 减淡各个主题的歌曲列表分隔线颜色

View File

@ -67,6 +67,7 @@ export default {
result.push({ result.push({
id: tag.id, id: tag.id,
name: tag.special_name, name: tag.special_name,
source: 'kg',
}) })
} }
return result return result
@ -95,7 +96,7 @@ export default {
this.getSongListUrl(sortId, tagId, page), this.getSongListUrl(sortId, tagId, page),
) )
return this._requestObj_list.promise.then(({ body }) => { 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) return this.filterList(body.special_db)
}) })
}, },

View File

@ -261,7 +261,7 @@ export default {
}) })
}, },
getTags() { 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' }))
}, },
} }

View File

@ -96,7 +96,8 @@ export default {
return this.setting.apiSource == 'temp' return this.setting.apiSource == 'temp'
}, },
tagList() { 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: { watch: {