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)])