From 6de0c3ea5751dcf6b57635713d5fdc1d97b42a36 Mon Sep 17 00:00:00 2001 From: woody Date: Mon, 29 Sep 2025 14:09:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(specialArea):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=94=E6=8A=98=E4=B8=93=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../special-area-wrapper.vue | 40 +++++++++---------- pages/other/index.vue | 2 + pages/specialArea/list.vue | 9 +++-- util/specialAreaMap.js | 5 +++ 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/components/area-product-list/special-area-wrapper.vue b/components/area-product-list/special-area-wrapper.vue index 5dfbb55..9520f85 100644 --- a/components/area-product-list/special-area-wrapper.vue +++ b/components/area-product-list/special-area-wrapper.vue @@ -1,11 +1,7 @@ @@ -66,6 +65,7 @@ import { UPGRADE_AREA, REPURCHASE_AREA, REISSUE_AREA, + HALF_PRICE_AREA, } from '@/util/specialAreaMap' import { MEMBER_SIGN } from '@/util/common' import areaProductList from '@/components/area-product-list/index.vue' @@ -93,24 +93,20 @@ export default { upgradeList: [], repurchaseList: [], rescissionList: [], + halfPriceList: [], regist: REGIEST_AREA, upgrade: UPGRADE_AREA, repurchase: REPURCHASE_AREA, rescission: REISSUE_AREA, + halfPrice: HALF_PRICE_AREA, } }, - computed: { - ...mapGetters(['isZeroLevel']), - }, created() { - const userInfo = uni.getStorageSync('userInfo') || this.userInfo - if (userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL) { - this.upgrade.name = '会员专区' - } this.getAreaListById(UPGRADE_AREA.id, this.upgradeList) this.getAreaListById(REISSUE_AREA.id, this.rescissionList) this.getAreaListById(REGIEST_AREA.id, this.registList) this.getAreaListById(REPURCHASE_AREA.id, this.repurchaseList) + this.getAreaListById(HALF_PRICE_AREA.id, this.halfPriceList) }, methods: { getAreaListById(areaId, list) { diff --git a/pages/other/index.vue b/pages/other/index.vue index 9de6b3b..b4cb5bd 100644 --- a/pages/other/index.vue +++ b/pages/other/index.vue @@ -385,6 +385,7 @@ import { UPGRADE_AREA, REPURCHASE_AREA, REISSUE_AREA, + HALF_PRICE_AREA, } from '@/util/specialAreaMap' export default { @@ -576,6 +577,7 @@ export default { UPGRADE_AREA, REISSUE_AREA, REPURCHASE_AREA, + HALF_PRICE_AREA, ] const title = areaList.find(item => item.id == areaId)?.name uni.setNavigationBarTitle({ diff --git a/pages/specialArea/list.vue b/pages/specialArea/list.vue index 3408c6f..98c3844 100644 --- a/pages/specialArea/list.vue +++ b/pages/specialArea/list.vue @@ -188,6 +188,7 @@ import { UPGRADE_AREA, REPURCHASE_AREA, REISSUE_AREA, + HALF_PRICE_AREA, } from '@/util/specialAreaMap' import { MEMBER_SIGN } from '@/util/common' import areaProductList from '@/components/area-product-list/index.vue' @@ -271,12 +272,10 @@ export default { this.userInfo = uni.getStorageSync('User') const areaMap = { [REGIEST_AREA.id]: REGIEST_AREA.name, - [UPGRADE_AREA.id]: - this.userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL - ? '会员专区' - : UPGRADE_AREA.name, + [UPGRADE_AREA.id]: UPGRADE_AREA.name, [REPURCHASE_AREA.id]: REPURCHASE_AREA.name, [REISSUE_AREA.id]: REISSUE_AREA.name, + [HALF_PRICE_AREA.id]: HALF_PRICE_AREA.name, } this.titLabel = areaMap[this.specialArea] uni.setNavigationBarTitle({ @@ -382,6 +381,7 @@ export default { }) }, getClassIfy() { + console.log(this.specialArea, '...specialArea') api .classifyList({ pkCountry: this.pkCountry, @@ -393,6 +393,7 @@ export default { // classifyName: '全部', // pkId: '', // }) + console.log(res.data, '...res.data') this.oneList = res.data this.oneId = this.oneList[0] ? this.oneList[0].pkId : '' this.getClassIfyTwo(this.oneList[0].pkId) diff --git a/util/specialAreaMap.js b/util/specialAreaMap.js index 9232909..8a5f742 100644 --- a/util/specialAreaMap.js +++ b/util/specialAreaMap.js @@ -17,3 +17,8 @@ export const REPURCHASE_AREA = { id: 43, name: '商城专区', } + +export const HALF_PRICE_AREA = { + id: 47, + name: '半价专区', +}