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,