diff --git a/src/main/resources/views/layouts/platform.html b/src/main/resources/views/layouts/platform.html
index 838c00e..03123ce 100644
--- a/src/main/resources/views/layouts/platform.html
+++ b/src/main/resources/views/layouts/platform.html
@@ -77,7 +77,7 @@
-
@@ -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 = []) {
for (const node of data) {
if (node && node.href === targetHref) {
@@ -540,6 +550,7 @@
created() {
this.matchMenu()
this.getUnReadMsgNum()
+ this.flushCache()
}
})