From f2e26a2ed58d4b9fae211fff8dd204b02b70850e Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Fri, 17 Mar 2023 15:28:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E5=93=81=E7=89=8C?= =?UTF-8?q?=E7=BE=8E=E9=A3=9F=E8=BF=87=E6=BB=A4=E6=9C=AA=E8=90=BD=E4=BD=8D?= =?UTF-8?q?=E5=BA=97=E9=93=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Guide/Guide.vue | 2 +- src/views/Index/Index.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue index 8426890..55fee8a 100644 --- a/src/views/Guide/Guide.vue +++ b/src/views/Guide/Guide.vue @@ -191,7 +191,7 @@ function changeFloor(index) { selectedShopList.value = shopList.value.map(brand => ({ ...brand, shopList: brand.shopList - .filter(item => item.floor === floor.floor) + .filter(item => item.floor === floor.floor && item.yaxis) .map(item => { const meta = currentFloorShopMap.value[item.shopCode] return { ...item, ...(meta ? meta : {}) } diff --git a/src/views/Index/Index.vue b/src/views/Index/Index.vue index a6065fd..85c3afa 100644 --- a/src/views/Index/Index.vue +++ b/src/views/Index/Index.vue @@ -159,7 +159,7 @@ const store = useStore() const { indexList, currentFloor, buildingList, shopList, sidebarList, config, theme } = storeToRefs(store) const guideDesc = ref('') const foodList = computed(() => { - const arr = shopList.value.filter(({ isSpecial }) => isSpecial) + const arr = shopList.value.filter(({ isSpecial, yaxis }) => isSpecial && yaxis) if (arr.length > 12) { while (arr.length % 4 !== 0) { arr.push(arr[Math.floor(Math.random() * arr.length)]) @@ -169,7 +169,7 @@ const foodList = computed(() => { }) const hotRecommend = computed(() => indexList?.value?.hotSearch?.slice(0, 5) ?? []) const recommendShops = computed(() => { - const arr = indexList?.value?.recommendList + const arr = indexList?.value?.recommendList.filter(({ yaxis }) => !!yaxis) if (arr.length > 12) { while (arr.length % 4 !== 0) { arr.push(arr[Math.floor(Math.random() * arr.length)])