更新依赖

This commit is contained in:
lyswhut
2020-11-10 10:59:45 +08:00
parent b820adf0bf
commit 4cdd2110a6
9 changed files with 71 additions and 57 deletions
+6 -4
View File
@@ -85,10 +85,12 @@ const actions = {
let source = rootState.setting.songList.source
const loadData = (id, page) => {
let key = `sdetail__${source}__${id}__${page}`
return cache.has(key) ? Promise.resolve(cache.get(key)) : music[source].songList.getListDetail(id, page).then(result => {
cache.set(key, result)
return result
})
return cache.has(key)
? Promise.resolve(cache.get(key))
: music[source].songList.getListDetail(id, page).then(result => {
cache.set(key, result)
return result
})
}
return loadData(id, 1).then(result => {
if (result.total <= result.limit) return result.list