From eeff323b9d9d1ac4af257d8cbdcf23952d8c4809 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Fri, 9 Dec 2022 15:37:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Index/Index.vue | 160 +++++++++++++++++--------------------- 1 file changed, 70 insertions(+), 90 deletions(-) diff --git a/src/views/Index/Index.vue b/src/views/Index/Index.vue index 1da13a5..9be5836 100644 --- a/src/views/Index/Index.vue +++ b/src/views/Index/Index.vue @@ -51,14 +51,16 @@
{{ switchLanguage(tab, 'title') }}
- @@ -72,8 +74,9 @@ import { useRouter } from 'vue-router' import { storeToRefs } from 'pinia' import { useStore } from '@/store/root' import { getBrandList } from '@/http/brand/api' -import { getWaterfallList } from '@/http/api' +import { getActivityList } from '@/http/api' import View from '@/layouts/View.vue' +import EffectFade from '@/components/EffectFade/EffectFade.vue' const router = useRouter() const store = useStore() @@ -83,6 +86,7 @@ const foodList = computed(() => shopList.value.filter(({ isSpecial }) => isSpeci const hotRecommend = computed(() => indexList.value.hotSearch.slice(0, 5) ?? []) const cardsList = computed(() => indexList.value.columnList ?? []) const bf = computed(() => (buildingList.length > 1 ? currentFloor.value.building + '-' : '') + currentFloor.value.floor) +const activityList = ref([]) getBrandList().then(({ data: { allShopNum, industryFatherList } }) => { const spFormat = industryFatherList.find(({ isSpecial }) => isSpecial) @@ -94,15 +98,15 @@ const goPage = item => { router.push(item.path) } -function handleCard(item) { - router.push('/index/waterfall?type=' + item.moduleType) -} - function handleHot(item) { const shop = shopList.value.find(_shop => _shop.shopId === item.shopId) store.SET_SHOP(shop) store.SET_SHOW_DETAIL(true) } +getActivityList(3).then(({ data }) => { + activityList.value = data?.activityList ?? [] + console.log(data.activityList) +})