From 0801294178614f9d132fda942785657f882af834 Mon Sep 17 00:00:00 2001 From: jiannibang Date: Wed, 21 Dec 2022 17:38:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=84=E5=A4=84=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=AF=BC=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/ShopItem/ShopItem.vue | 10 +-- src/components/BrandScroll/BrandScroll.vue | 42 ++++++++-- src/components/Search/Search.vue | 9 ++- src/router/routes.js | 2 +- src/store/root/state.js | 2 +- src/views/Brand/Brand.vue | 8 +- src/views/Foods/Foods.vue | 10 +-- src/views/Guide/Guide.vue | 91 ++++++++++++++-------- src/views/Index/Index.vue | 2 +- 9 files changed, 110 insertions(+), 66 deletions(-) diff --git a/src/base/ShopItem/ShopItem.vue b/src/base/ShopItem/ShopItem.vue index 1ef424c..07453c6 100644 --- a/src/base/ShopItem/ShopItem.vue +++ b/src/base/ShopItem/ShopItem.vue @@ -18,20 +18,14 @@ diff --git a/src/views/Foods/Foods.vue b/src/views/Foods/Foods.vue index a9e55b4..07017e7 100644 --- a/src/views/Foods/Foods.vue +++ b/src/views/Foods/Foods.vue @@ -1,6 +1,6 @@ @@ -14,22 +14,20 @@ import BrandScroll from '@/components/BrandScroll/BrandScroll.vue' const store = useStore() const { config, shopList } = storeToRefs(store) - +const shop = ref(null) const selectedList = ref([]) Promise.all([getBrandListByFloor()]).then(([_brandList]) => { const list = _brandList.data.list.map(item => ({ name: item.name, - shopList: item.shopList.filter(shop => shop.isSpecial) + shopList: item.shopList.filter(_ => _.isSpecial) })) selectedList.value = list }) function handleShop(item) { - const shop = shopList.value.find(_shop => _shop.shopId === item.shopId) - store.SET_SHOP(shop) - store.SET_SHOW_DETAIL(true) + shop.value = shopList.value.find(_shop => _shop.shopId === item.shopId) } diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue index e17757a..df2fb1d 100644 --- a/src/views/Guide/Guide.vue +++ b/src/views/Guide/Guide.vue @@ -5,7 +5,7 @@
全部楼层
- +
@@ -64,7 +64,7 @@