From 0975359ec12e423da75f178bcd198e53d283f4ea Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Fri, 12 Jul 2024 11:31:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/Index.vue | 58 +++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/src/views/index/Index.vue b/src/views/index/Index.vue index 4e22983..4d8f469 100644 --- a/src/views/index/Index.vue +++ b/src/views/index/Index.vue @@ -164,23 +164,24 @@ 常用功能 - -
-
-
- + @@ -212,11 +213,18 @@ const functions = [ link: '/goods/create' }, { - name: '店铺装修', - icon: Icons.functions.decorate, - color: '#f15858', - link: '/page/index' + name: '数据统计', + icon: Icons.functions.statistics, + color: '#139dff', + link: '/statistics', + moduleKey: 'statistics-statistics' }, + // { + // name: '店铺装修', + // icon: Icons.functions.decorate, + // color: '#f15858', + // link: '/page/index' + // }, { name: '会员管理', icon: Icons.functions.user, @@ -248,13 +256,6 @@ const functions = [ color: '#f15858', link: '/market/coupon/index', moduleKey: 'app-coupon' - }, - { - name: '数据统计', - icon: Icons.functions.statistics, - color: '#139dff', - link: '/statistics', - moduleKey: 'statistics-statistics' } ] @@ -308,6 +309,11 @@ export default { data } }, + computed: { + storeVersion() { + return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0 + } + }, created () { // 获取首页数据 this.getData() From 15db2e0c1e6757e94878f0ab68e5023122c28365 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Fri, 12 Jul 2024 12:13:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/Index.vue | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/views/index/Index.vue b/src/views/index/Index.vue index f195ace..529bd7e 100644 --- a/src/views/index/Index.vue +++ b/src/views/index/Index.vue @@ -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: {