直接从歌单详情收藏的列表新增同步功能

This commit is contained in:
lyswhut
2020-12-10 12:57:48 +08:00
parent 2056bdb43d
commit f1049169b5
9 changed files with 86 additions and 10 deletions
+12 -4
View File
@@ -405,14 +405,22 @@ export default {
},
async fetchList() {
this.detailLoading = true
const list = await this.getListDetailAll(this.selectListInfo.id)
this.detailLoading = false
return list
return this.getListDetailAll({ source: this.source, id: this.selectListInfo.id }).catch(err => {
return Promise.reject(err)
}).finally(() => {
this.detailLoading = false
})
},
async addSongListDetail() {
if (!this.listDetail.info.name) return
const list = await this.fetchList()
this.createUserList({ name: this.listDetail.info.name, id: `${this.listDetail.source}__${this.listDetail.id}`, list })
this.createUserList({
name: this.listDetail.info.name,
id: `${this.listDetail.source}__${this.listDetail.id}`,
list,
source: this.listDetail.source,
sourceListId: this.listDetail.id,
})
},
async playSongListDetail() {
if (!this.listDetail.info.name) return