From 4ebe2f2b2c5e5501f297bd4cd1122a1f8ec518e6 Mon Sep 17 00:00:00 2001 From: woody Date: Tue, 10 Jun 2025 17:03:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(user):=200=E7=BA=A7=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../area-product-list/special-area-wrapper.vue | 10 +++++++++- pages/index/index.vue | 16 +++++++++++++--- store/getters.js | 4 +++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/components/area-product-list/special-area-wrapper.vue b/components/area-product-list/special-area-wrapper.vue index 7a992a9..e2477ee 100644 --- a/components/area-product-list/special-area-wrapper.vue +++ b/components/area-product-list/special-area-wrapper.vue @@ -65,6 +65,13 @@ import { getAreaGoods } from '@/config/special-area' import { mapGetters } from 'vuex' export default { name: 'SpecialAreaWrapper', + props: { + size: { + type: String, + default: 'normal', // 'normal' or 'small' + validator: value => ['normal', 'small'].includes(value), + }, + }, components: { 'area-product-list': areaProductList, }, @@ -84,7 +91,8 @@ export default { ...mapGetters(['isZeroLevel']), }, created() { - if (!this.isZeroLevel) { + const userInfo = uni.getStorageSync('userInfo') + if (userInfo.memberSign != MEMBER_SIGN.ZERO_LEVEL) { this.getAreaListById(REISSUE_AREA.id, this.rescissionList) this.getAreaListById(REGIEST_AREA.id, this.registList) } diff --git a/pages/index/index.vue b/pages/index/index.vue index 59fcc14..d1ddac9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -28,7 +28,7 @@ - + state.system.priceSymbol, priceDecimal: state => state.system.priceDecimal, priceSymbolVisible: state => state.system.priceSymbolVisible, - isZeroLevel: state => state.user?.user?.memberSign === MEMBER_SIGN.ZERO_LEVEL, + isZeroLevel: state => + state.user?.user?.memberSign === MEMBER_SIGN.ZERO_LEVEL || + (!state.user?.user?.memberSign && state.user?.user?.memberSign !== 0), } export default getters