每日进入刷新缓存
This commit is contained in:
@@ -502,6 +502,16 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async flushCache(){
|
||||||
|
const day = moment().format('YYYY-MM-DD')
|
||||||
|
if (window.localStorage.getItem('flushCache') !== day) {
|
||||||
|
const {code, msg} = await $.post('/platform/home/clearCache')
|
||||||
|
if (code === 0) {
|
||||||
|
location.reload()
|
||||||
|
}
|
||||||
|
window.localStorage.setItem('flushCache', day)
|
||||||
|
}
|
||||||
|
},
|
||||||
findParentNodes(data, targetHref, parents = []) {
|
findParentNodes(data, targetHref, parents = []) {
|
||||||
for (const node of data) {
|
for (const node of data) {
|
||||||
if (node && node.href === targetHref) {
|
if (node && node.href === targetHref) {
|
||||||
@@ -540,6 +550,7 @@
|
|||||||
created() {
|
created() {
|
||||||
this.matchMenu()
|
this.matchMenu()
|
||||||
this.getUnReadMsgNum()
|
this.getUnReadMsgNum()
|
||||||
|
this.flushCache()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user