diff --git a/src/store/root/getters.js b/src/store/root/getters.js index 79d8870..8e41bbd 100644 --- a/src/store/root/getters.js +++ b/src/store/root/getters.js @@ -32,7 +32,7 @@ export const currentFloorShopMap = ({ currentFloor: device, shopList, mapData }) const deviceX = nodes[device.location].x const deviceY = nodes[device.location].y return shopList - .filter(shop => shop.floor === device.floor && shop.yaxis) + .filter(shop => shop.floor === device.floor) .reduce((acc, shop) => { const result = {} try { diff --git a/src/views/Brand/Brand.vue b/src/views/Brand/Brand.vue index 4292510..6dd1370 100644 --- a/src/views/Brand/Brand.vue +++ b/src/views/Brand/Brand.vue @@ -22,7 +22,7 @@ Promise.all([getBrandListByFloor()]).then(([_brandList]) => { if (storeRefs.shop.value) shop.value = storeRefs.shop.value const recMap = indexList.value.recommendList.reduce((acc, { shopCode }) => ({ ...acc, [shopCode]: true }), {}) const list = _brandList.data.list - selectedList.value = list.map(({ name, shopList: _shopList }) => ({ name, shopList: _shopList.filter(({ shopCode, yaxis }) => recMap[shopCode] && yaxis) })) + selectedList.value = list.map(({ name, shopList: _shopList }) => ({ name, shopList: _shopList.filter(({ shopCode }) => recMap[shopCode]) })) }) function handleShop(item) { diff --git a/src/views/Foods/Foods.vue b/src/views/Foods/Foods.vue index 0110822..a2e3918 100644 --- a/src/views/Foods/Foods.vue +++ b/src/views/Foods/Foods.vue @@ -22,7 +22,7 @@ Promise.all([getBrandListByFloor()]).then(([_brandList]) => { if (storeRefs.shop.value) shop.value = storeRefs.shop.value const list = _brandList.data.list.map(item => ({ name: item.name, - shopList: item.shopList.filter(_ => _.isSpecial && _.yaxis) + shopList: item.shopList.filter(_ => _.isSpecial) })) selectedList.value = list }) diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue index 55fee8a..4c410bc 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 && item.yaxis) + .filter(item => item.floor === floor.floor) .map(item => { const meta = currentFloorShopMap.value[item.shopCode] return { ...item, ...(meta ? meta : {}) } @@ -218,7 +218,7 @@ function filterAboutCurrentInfo(needShowFloor = true) { selectedShopList.value = shopList.value.map(brand => ({ ...brand, shopList: brand.shopList - .filter(item => item.floor === floor && item.yaxis) + .filter(item => item.floor === floor) .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 c5bd0ae..77c8c7b 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, yaxis }) => isSpecial && yaxis) + const arr = shopList.value.filter(({ isSpecial }) => isSpecial) 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.filter(({ yaxis }) => !!yaxis) + const arr = indexList?.value?.recommendList if (arr.length > 12) { while (arr.length % 4 !== 0) { arr.push(arr[Math.floor(Math.random() * arr.length)])