2 Commits

Author SHA1 Message Date
b3a15eee9b feat: 卡片数据调整对应 2026-07-14 09:17:49 +08:00
68ffab28bd feat: 头部调高4px 2026-07-14 09:17:18 +08:00
3 changed files with 21 additions and 6 deletions

View File

@@ -43,12 +43,12 @@
} }
.home-hero { .home-hero {
height: 136px; height: 140px;
overflow: hidden; overflow: hidden;
} }
.home-hero-bg { .home-hero-bg {
height: 136px; height: 140px;
} }
.home-hero-sprite { .home-hero-sprite {

View File

@@ -2,6 +2,7 @@
width: 100%; width: 100%;
height: 356px; height: 356px;
overflow: hidden; overflow: hidden;
padding-bottom: 12px;
} }
.explore-scroll { .explore-scroll {

View File

@@ -6,9 +6,8 @@
<scroll-view class="discovery-scroll" scroll-y @scroll="handleContentScroll"> <scroll-view class="discovery-scroll" scroll-y @scroll="handleContentScroll">
<view class="discovery-body"> <view class="discovery-body">
<ExploreCards v-if="discoveryCards.length > 0 && isPanoramaGuideTab" :list="discoveryCards" <CardSwiper v-if="discoveryCards.length > 0" :list="discoveryCards" @didSelectItem="handleCardClick" />
@didSelectItem="handleCardClick" /> <ExploreCards v-if="exploreCards.length > 0" :list="exploreCards" @didSelectItem="handleCardClick" />
<CardSwiper v-else-if="discoveryCards.length > 0" :list="discoveryCards" @didSelectItem="handleCardClick" />
<QuickQuestions v-if="discoveryQuickQuestions.length > 0" :list="discoveryQuickQuestions" <QuickQuestions v-if="discoveryQuickQuestions.length > 0" :list="discoveryQuickQuestions"
@didSelectItem="handleQuickQuestionClick" /> @didSelectItem="handleQuickQuestionClick" />
@@ -47,6 +46,7 @@ const sceneId = appStore.sceneId || "";
const activeIndex = ref(0); const activeIndex = ref(0);
const discoveryTabs = ref([]); const discoveryTabs = ref([]);
const discoveryCards = ref([]); const discoveryCards = ref([]);
const exploreCards = ref([]);
const discoveryQuickQuestions = ref([]); const discoveryQuickQuestions = ref([]);
const emit = defineEmits(["content-scroll"]); const emit = defineEmits(["content-scroll"]);
@@ -106,12 +106,26 @@ const queryDiscoveryData = async (tabId) => {
/// 请求发现页卡片数据 /// 请求发现页卡片数据
const queryDiscoveryCards = 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) { if (res.code === 0) {
discoveryCards.value = configDataList(res.data); 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 queryQuickQuestionData = async (tabId) => {
const res = await homeQuickQuestionData({ tagId: tabId }); const res = await homeQuickQuestionData({ tagId: tabId });