From b680699a0cc86755ea279dbc96997455597b3683 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Wed, 18 Aug 2021 13:32:45 +0800 Subject: [PATCH] optimize loading status --- src/views/Home.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 2c875e40..5c9c449b 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -115,8 +115,9 @@ export default { AppFooter, }, data() { + const chains = this.$store.state.chains.config return { - chains: [], + chains, downImg: require('@/assets/images/pages/under-maintenance.svg'), } }, @@ -131,7 +132,7 @@ export default { }, }, created() { - this.chains = JSON.parse(localStorage.getItem('chains')) + this.fetch() this.timer = setInterval(this.fetch, 120000) }, beforeDestroy() { @@ -139,6 +140,7 @@ export default { }, methods: { fetch() { + console.log('fetch') Object.keys(this.chains).forEach(k => { const chain = this.chains[k] if (chain.api) {