From 7e4d43b517555252d75b7c4d444101918b3e3897 Mon Sep 17 00:00:00 2001 From: woody Date: Fri, 25 Apr 2025 10:04:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(specialArea/list):=20tab=E9=A1=B5=E7=AD=BE?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=80=BB=E8=BE=91=E5=8F=98=E6=9B=B4=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E4=B8=8D=E5=B1=95=E7=A4=BA=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BA=86=E4=B9=8B=E5=89=8D=E5=BC=82=E6=AD=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/specialArea/list.vue | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/pages/specialArea/list.vue b/pages/specialArea/list.vue index 9465b05..2912a5d 100644 --- a/pages/specialArea/list.vue +++ b/pages/specialArea/list.vue @@ -17,7 +17,7 @@ - + @@ -175,23 +175,13 @@ } this.titLabel = options.label; - let arr = JSON.parse(options.children); + let tempArr = JSON.parse(options.children); if (this.specialArea != 18) { - arr.forEach((ctem) => { - ctem.isShow = false; - }); api.menuList().then((res) => { - res.data.forEach((item) => { - arr.forEach((ctem) => { - if (ctem.name == item.menuKey) { - ctem.isShow = true; - } - }); - }); + tempArr = tempArr.filter(item => res.data.find(ctem => ctem.menuKey == item.name)); + this.itemChildren = tempArr; }); } - - this.itemChildren = arr; // 修改标题 uni.setNavigationBarTitle({ title: this.titLabel,