feat: add heritage discovery tab and AIGC consent dialog

- Add new HeritageDiscoverySection and HeritageQuickPrompts components for dedicated heritage discovery view
- Implement reusable AigcConsentDialog component for AI service user agreement prompts
- Update Discovery page to toggle between explore and heritage tab layouts
- Refactor legacy CardSwiper component into generic ExploreCards
- Adjust ChatMainList layout to include home hero sprite animation and restructure welcome section
- Refine NoticeMessage component styling and layout for better consistency
- Add build best practices guidance to AGENTS.md documentation
- Clean up minor config whitespace and formatting issues across files
This commit is contained in:
duanshuwen
2026-07-05 14:56:55 +08:00
parent 251f92bc1a
commit ca680ab41b
16 changed files with 1021 additions and 125 deletions

View File

@@ -17,24 +17,34 @@
@touchmove="emitScrollTouch"
@scroll="emitScrollTouch"
>
<CardSwiper v-if="discoveryCards.length > 0" :list="discoveryCards" @didSelectItem="handleCardClick" />
<HeritageDiscoverySection
v-if="isHeritageTab"
:cards="discoveryCards"
:prompts="discoveryQuickQuestions"
@select-card="handleCardClick"
@select-prompt="handleQuickQuestionClick"
/>
<QuickQuestions v-if="discoveryQuickQuestions.length > 0" :list="discoveryQuickQuestions" @didSelectItem="handleQuickQuestionClick" />
<template v-else>
<ExploreCards v-if="discoveryCards.length > 0" :list="discoveryCards" @didSelectItem="handleCardClick" />
<QuickQuestions v-if="discoveryQuickQuestions.length > 0" :list="discoveryQuickQuestions" @didSelectItem="handleQuickQuestionClick" />
</template>
</scroll-view>
</view>
</template>
<script setup>
import { onMounted, ref } from "vue";
import { computed, onMounted, ref } from "vue";
import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE, SWITCH_TO_COMPANION_TAB } from "@/constant/constant";
import { navigateTo } from "@/router";
import { getAccessToken } from "@/constant/token";
import FindTabs from "./components/FindTabs/index.vue";
import CardSwiper from "./components/CardSwiper/index.vue";
import ExploreCards from "./components/ExploreCards/index.vue";
import HeritageDiscoverySection from "./components/HeritageDiscoverySection/index.vue";
import QuickQuestions from "./components/QuickQuestions/index.vue";
import discoveryCover from "@/components/ImageSwiper/images/2025-07-12_180248.jpg";
import { homeTabsData, getNearbyTags, homeTabContentData, homeQuickQuestionData } from "../../request/api/MainPageDataApi";
import { useAppStore, useLocationStore } from "@/store";
@@ -51,6 +61,8 @@ const discoveryCards = ref([]);
const discoveryQuickQuestions = ref([]);
const emit = defineEmits(["scroll-touch-start", "scroll-touch"]);
const isHeritageTab = computed(() => discoveryTabs.value[activeIndex.value]?.label === "小七孔古桥");
const emitScrollTouchStart = () => {
emit("scroll-touch-start");
};