修复歌单详情获取流程问题
parent
674a3a0a3f
commit
7cf2e4c4ed
|
@ -105,7 +105,7 @@ const actions = {
|
||||||
: music[source]?.songList.getListDetail(id, page).then(result => {
|
: music[source]?.songList.getListDetail(id, page).then(result => {
|
||||||
cache.set(key, result)
|
cache.set(key, result)
|
||||||
return result
|
return result
|
||||||
})
|
}) ?? Promise.reject(new Error('source not found'))
|
||||||
}
|
}
|
||||||
return loadData(id, 1).then(result => {
|
return loadData(id, 1).then(result => {
|
||||||
if (result.total <= result.limit) return filterList(result.list)
|
if (result.total <= result.limit) return filterList(result.list)
|
||||||
|
|
|
@ -298,10 +298,13 @@ export default {
|
||||||
this.listWidth = this.$refs.tagList.$el.clientWidth + this.$refs.tab.$el.clientWidth + 2
|
this.listWidth = this.$refs.tagList.$el.clientWidth + this.$refs.tab.$el.clientWidth + 2
|
||||||
},
|
},
|
||||||
handleGetListDetail(id, source, page) {
|
handleGetListDetail(id, source, page) {
|
||||||
|
this.detailLoading = true
|
||||||
this.isGetDetailFailed = false
|
this.isGetDetailFailed = false
|
||||||
return this.getListDetail({ id, source, page }).catch(err => {
|
return this.getListDetail({ id, source, page }).catch(err => {
|
||||||
this.isGetDetailFailed = true
|
this.isGetDetailFailed = true
|
||||||
return Promise.reject(err)
|
return Promise.reject(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.detailLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async fetchList() {
|
async fetchList() {
|
||||||
|
|
Loading…
Reference in New Issue