修复歌单详情获取流程问题

pull/930/merge
lyswhut 2022-03-18 14:56:29 +08:00
parent 674a3a0a3f
commit 7cf2e4c4ed
2 changed files with 4 additions and 1 deletions

View File

@ -105,7 +105,7 @@ const actions = {
: music[source]?.songList.getListDetail(id, page).then(result => {
cache.set(key, result)
return result
})
}) ?? Promise.reject(new Error('source not found'))
}
return loadData(id, 1).then(result => {
if (result.total <= result.limit) return filterList(result.list)

View File

@ -298,10 +298,13 @@ export default {
this.listWidth = this.$refs.tagList.$el.clientWidth + this.$refs.tab.$el.clientWidth + 2
},
handleGetListDetail(id, source, page) {
this.detailLoading = true
this.isGetDetailFailed = false
return this.getListDetail({ id, source, page }).catch(err => {
this.isGetDetailFailed = true
return Promise.reject(err)
}).finally(() => {
this.detailLoading = false
})
},
async fetchList() {