From b3a15eee9b431717c055005a4fa39a67b70fd314 Mon Sep 17 00:00:00 2001 From: zoujing Date: Tue, 14 Jul 2026 09:17:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=A1=E7=89=87=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AF=B9=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ExploreCards/styles/index.scss | 1 + src/pages/Discovery/index.vue | 22 +++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/pages/Discovery/components/ExploreCards/styles/index.scss b/src/pages/Discovery/components/ExploreCards/styles/index.scss index 44864fb..6fba846 100644 --- a/src/pages/Discovery/components/ExploreCards/styles/index.scss +++ b/src/pages/Discovery/components/ExploreCards/styles/index.scss @@ -2,6 +2,7 @@ width: 100%; height: 356px; overflow: hidden; + padding-bottom: 12px; } .explore-scroll { diff --git a/src/pages/Discovery/index.vue b/src/pages/Discovery/index.vue index 420494d..9a48c0b 100644 --- a/src/pages/Discovery/index.vue +++ b/src/pages/Discovery/index.vue @@ -6,9 +6,8 @@ - - + + @@ -47,6 +46,7 @@ const sceneId = appStore.sceneId || ""; const activeIndex = ref(0); const discoveryTabs = ref([]); const discoveryCards = ref([]); +const exploreCards = ref([]); const discoveryQuickQuestions = ref([]); const emit = defineEmits(["content-scroll"]); @@ -106,12 +106,26 @@ const queryDiscoveryData = async (tabId) => { /// 请求发现页卡片数据 const queryDiscoveryCards = async (tabId) => { - const res = await homeTabContentData({ tagId: tabId }); + loadDiscoveryCards(tabId); + loadExploreCards(tabId); +} + +/// 请求发现页卡片数据 轮播 +const loadDiscoveryCards = async (tabId) => { + const res = await homeTabContentData({ tagId: tabId, resourceType: 0 }); if (res.code === 0) { discoveryCards.value = configDataList(res.data); } } +/// 请求发现页探索卡片数据 大卡片 +const loadExploreCards = async (tabId) => { + const res = await homeTabContentData({ tagId: tabId, resourceType: 1 }); + if (res.code === 0) { + exploreCards.value = configDataList(res.data); + } +} + /// 请求快速问题列表数据 const queryQuickQuestionData = async (tabId) => { const res = await homeQuickQuestionData({ tagId: tabId });