|
|
|
@ -310,17 +310,29 @@ export default { |
|
|
|
|
// 正在提交 |
|
|
|
|
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 () { |
|
|
|
|
// 获取首页数据 |
|
|
|
|
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: { |
|
|
|
|
|
|
|
|
|