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();