From 5252879a3d69942c22f159f0c9bcf904d3d1f0c4 Mon Sep 17 00:00:00 2001 From: woody Date: Thu, 18 Sep 2025 11:36:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(specialArea):=20=E9=A6=96=E9=A1=B5=E4=B8=93?= =?UTF-8?q?=E5=8C=BA=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../special-area-wrapper.vue | 22 +++++++++---------- pages/index/index.vue | 5 +---- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/components/area-product-list/special-area-wrapper.vue b/components/area-product-list/special-area-wrapper.vue index 0862cad..940ae3c 100644 --- a/components/area-product-list/special-area-wrapper.vue +++ b/components/area-product-list/special-area-wrapper.vue @@ -103,17 +103,17 @@ export default { ...mapGetters(['isZeroLevel']), }, created() { - const userInfo = Object.keys(this.userInfo).length - ? this.userInfo - : uni.getStorageSync('userInfo') - if (userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL) { - this.upgrade.name = '会员专区' - } else { - this.getAreaListById(REISSUE_AREA.id, this.rescissionList) - this.getAreaListById(REGIEST_AREA.id, this.registList) - this.getAreaListById(REPURCHASE_AREA.id, this.repurchaseList) - } - this.getAreaListById(UPGRADE_AREA.id, this.upgradeList) + this.$store.dispatch('GetInfo').then(user => { + const userInfo = user + if (userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL) { + this.upgrade.name = '会员专区' + } else { + this.getAreaListById(REISSUE_AREA.id, this.rescissionList) + this.getAreaListById(REGIEST_AREA.id, this.registList) + this.getAreaListById(REPURCHASE_AREA.id, this.repurchaseList) + } + this.getAreaListById(UPGRADE_AREA.id, this.upgradeList) + }) }, methods: { getAreaListById(areaId, list) { diff --git a/pages/index/index.vue b/pages/index/index.vue index 087c449..a5d095c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -29,7 +29,7 @@ - + @@ -128,9 +128,6 @@ export default { }, computed: { ...mapGetters(['priceSymbol', 'priceSymbolVisible', 'isZeroLevel']), - specialAreaVisble() { - return this.userInfo && Object.keys(this.userInfo).length - }, }, onLoad() { // this.getLanguage();