feat: 完善模块引导与学习进度体验

统一引导提示的持久化控制,补充学习进度入口与模块资源,避免用户返回页面时重复触发提示。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.7 committed 2026-05-08 09:44:59 +08:00
1 parent fc9633f371
commit 6f8252472f
114 files changed
+2758 -1798

No files matched your search

@@ -1,17 +1,15 @@
<script lang="ts" setup>
import { ref, computed } from 'vue'
import { useRouter } from 'vue-router'
import { GuideSteps, GuideStepsItem } from '@/components/Guide'
import { GuideSteps } from '@/components/Guide'
import { Overlay } from '@/components/Overlay'
import { ImgButton } from '@/components/Button'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
import { getBackgroundImage, getPublicPath, getStaticImage, IMAGE_PATHS } from '@/utils'
import shootingtitle from '@/assets/images/shooting/标题-实地取景.png'
import videoSrc from '/video/new/xsdh_jzgtf_batch.mp4'
import videoSrc from '/video/new/composition/xsdh_jzgtf_batch.mp4'
import KnowledgeCard from '@/components/KnowledgeCard/FilmKnowledgeCard.vue'
import { Video } from '@/components'
import { useFilmStore } from '@/stores'
const film = useFilmStore()
import { useFilmStore } from '@/stores/modules/film'
type Btn = {
key: string
@@ -22,22 +20,22 @@ type Btn = {
}
const router = useRouter()
const filmStore = useFilmStore()
const introGuideKey = 'film-shooting-intro'
const compositionGuideKey = 'film-shooting-composition'
const showIntroGuide = ref(!filmStore.guideShown[introGuideKey])
const showCompositionGuide = ref(!filmStore.guideShown[compositionGuideKey])
if (showIntroGuide.value) {
filmStore.markGuideShown(introGuideKey)
}
const steps = ref([
{
id: '1',
audioSrc: getPublicPath('audio/py_4_015.MP3'),
content: '哇,徐汇滨江真的超适合取景!一起看看可以运用哪些构图方法吧~',
highlightSelector: '.btn-1'
},
{
id: '2',
content: '跟随箭头指引,一键解锁取景地',
highlightSelector: '.btn-2'
},
{
id: '3',
content: '跟随箭头指引,一键解锁取景地',
highlightSelector: '.btn-3'
}
])
@@ -98,6 +96,13 @@ const handleModalClose = () => {
showModal.value = false
}
const openCompositionGuide = () => {
showModal.value = true
if (showCompositionGuide.value) {
filmStore.markGuideShown(compositionGuideKey)
}
}
const handleClick = (item: any) => {
currentItem.value = item
showModal2.value = true
@@ -142,12 +147,12 @@ const back = () => {
<ImgButton class="btn-3" image="film/shooting/油罐艺术公园入口.png" @click="handleClickB" />
</div>
<div class="shooting-composition btn-1">
<ImgButton image="shooting/构图指南.png" @click="showModal = true" />
<ImgButton image="shooting/构图指南.png" @click="openCompositionGuide" />
</div>
<!-- 引导步骤 -->
<GuideSteps
:visible="true"
:visible="showIntroGuide"
:steps="steps"
:highlight-padding="12"
:highlight-radius="20"
@@ -196,7 +201,7 @@ const back = () => {
</div>
<GuideSteps
:visible="true"
:visible="showCompositionGuide"
:steps="guideSteps"
:keyboard-navigation="true"
:highlight-padding="12"