From 7fba675e7f03ec3adf1de262e5130cc6ae5a1706 Mon Sep 17 00:00:00 2001 From: woody Date: Fri, 31 Oct 2025 09:16:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(index):=20=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 13 +++++++++++-- pages/specialArea/drawer-list.vue | 22 +++++++++++++--------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 562df41..70a137f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -605,8 +605,17 @@ export default { }) }) } else { - if (item.specialArea == 30) { - this.goAreaUrl() + if (item.specialArea === 3) { + uni.navigateTo({ + url: + '/pages/specialArea/drawer-list?label=' + + item.specialAreaName + + '&specialArea=' + + item.specialArea + + '&children=' + + JSON.stringify(this.zoneList[tapx].children) + + '&diff=1', + }) } else { uni.navigateTo({ url: diff --git a/pages/specialArea/drawer-list.vue b/pages/specialArea/drawer-list.vue index 5d6e61f..d14f421 100644 --- a/pages/specialArea/drawer-list.vue +++ b/pages/specialArea/drawer-list.vue @@ -244,12 +244,12 @@ {{ truncateText(item.classifyName, 12) }} - + {{ @@ -338,6 +338,7 @@ export default { waresName: '', expandedMenus: [], // 存储展开的一级菜单ID showCategoryDrawer: false, // 控制分类抽屉显示 + currentCategory: '', } }, onLoad(options) { @@ -444,7 +445,7 @@ export default { const children = item.children if (children && children.length > 0) { item.children = [ - { classifyName: '全部', pkId: item.pkId }, + // { classifyName: '全部', pkId: item.pkId }, ...children, ] } @@ -460,7 +461,8 @@ export default { if (this.oneList[0]) { this.oneId = this.oneList[0].pkId this.twoId = this.oneList[0].pkId - this.getAllGoods(this.oneList[0].pkId) + this.currentCategory = this.oneId + this.getAllGoods(this.currentCategory) } } }) @@ -474,7 +476,8 @@ export default { selectFirstLevel(item) { this.oneId = item.pkId this.twoId = item.pkId - this.getAllGoods(item.pkId) + this.currentCategory = item.pkId + this.getAllGoods(this.currentCategory) }, // 切换展开状态(不影响选择状态) toggleExpand(pkId) { @@ -492,7 +495,8 @@ export default { // 选择二级分类 selectSecondLevel(item) { this.twoId = item.pkId - this.getAllGoods1(item.pkId) + this.currentCategory = item.pkId + this.getAllGoods1(this.currentCategory) // 不自动关闭抽屉,让用户手动关闭 }, // 打开分类抽屉