隐藏首页菜单

master
wangdong 8 months ago
parent 9482e11342
commit 15db2e0c1e
  1. 24
      src/views/index/Index.vue

@ -310,17 +310,29 @@ export default {
// //
isLoading: false, isLoading: false,
// //
data data,
timer: null,
storeVersion: window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0
} }
}, },
computed: {
storeVersion() {
return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0
}
},
created () { created () {
// //
this.getData() this.getData()
if (!window.localStorage.getItem('storeInfo')) {
this.timer = setInterval(() => {
if (window.localStorage.getItem('storeInfo')) {
this.storeVersion = JSON.parse(window.localStorage.getItem('storeInfo')).store_version
window.clearInterval(this.timer)
this.timer = null
}
}, 100)
}
},
beforeDestroy() {
if (this.timer) {
window.clearInterval(this.timer)
this.timer = null
}
}, },
methods: { methods: {

Loading…
Cancel
Save