更新已收藏的在线列表时,将始终重新加载,不再使用缓存

This commit is contained in:
lyswhut
2022-01-18 15:34:48 +08:00
parent bad2e98757
commit 30d5f53c1d
5 changed files with 11 additions and 7 deletions
+2 -1
View File
@@ -66,11 +66,12 @@ const actions = {
return listInfo
})
},
getListAll({ state, rootState }, id) {
getListAll({ state, rootState }, { id, isRefresh = false }) {
// console.log(source, id)
let [source, bangId] = id.split('__')
const loadData = (id, page) => {
let key = `${source}${id}${page}`
if (isRefresh && cache.has(key)) cache.delete(key)
return cache.has(key)
? Promise.resolve(cache.get(key))
: music[source].leaderboard.getList(bangId, page).then(result => {