排行榜界面添加播放、收藏整个排行榜功能

This commit is contained in:
lyswhut
2021-05-17 15:43:47 +08:00
parent 81643165c2
commit 0878c7398d
8 changed files with 190 additions and 31 deletions
+12 -1
View File
@@ -358,6 +358,9 @@ export default {
'sortList',
]),
...mapActions('songList', ['getListDetailAll']),
...mapActions('leaderboard', {
getBoardListAll: 'getListAll',
}),
...mapActions('download', ['createDownload', 'createDownloadMultiple']),
...mapMutations('player', {
setPlayList: 'setList',
@@ -902,7 +905,15 @@ export default {
} else {
this.fetchingListStatus[id] = true
}
return this.getListDetailAll({ source, id: sourceListId }).finally(() => {
let promise
if (/board__/.test(sourceListId)) {
const id = sourceListId.replace(/board__/, '')
promise = this.getBoardListAll(id)
} else {
promise = this.getListDetailAll({ source, id: sourceListId })
}
return promise.finally(() => {
this.fetchingListStatus[id] = false
})
},