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

+69 -31
View File
@@ -2,14 +2,9 @@
import { computed, nextTick, onMounted, ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import ImgButton from '@/components/Button/ImgButton.vue'
import { GuideSteps, StepNavigation } from '@/components/Guide'
import { GuideSteps, StepNavigation, type GuideStep } from '@/components/Guide'
import { Video } from '@/components'
import { getStaticImage, IMAGE_PATHS } from '@/utils'
import second from '/video/vlog_renwuqujing_jichujingbieyunyong.mp4'
import third from '/video/vlog_renwuqujing_huamiangoutu.mp4'
import fourth from '/video/vlog_renwuqujing_jiaobencehua.mp4'
import five from '/video/vlog_renwuqujing_zhuapai.mp4'
import six from '/video/vlog_renwuqujing_jianjipingjie.mp4'
import { getPublicPath, getStaticImage, IMAGE_PATHS } from '@/utils'
import { useInterviewStore } from '@/stores'
const router = useRouter()
@@ -22,44 +17,78 @@ const playing = ref(false)
const status = ref(false)
//引导步骤
const steps = ref([
const steps = ref<GuideStep[]>([
{
id: 'step1',
content: '试着用这些方法记录身边的小事,你会发现,原来平凡的日子里有这么多值得捕捉的瞬间。'
audioSrc: getPublicPath('audio/py_3_006.MP3'),
content: '刚才我们学习了访谈作品的核心拍摄技能,现在通过这张思维导图来回顾一下吧!'
}
])
const introGuideSteps = computed<GuideStep[]>(() => {
if (key.value === 'case') {
return [
{
id: 'case-intro',
audioSrc: getPublicPath('audio/py_3_003.MP3'),
content: '现在,让我们通过一段访谈案例,去看看同龄人心中的职业蓝图吧!'
}
]
}
if (key.value === 'profession') {
return [
{
id: 'profession-intro1',
audioSrc: getPublicPath('audio/py_3_004.MP3'),
content: '看完作品后,你可能已经感受到了,一条访谈视频,好像并不是“坐着讲话”这么简单。'
},
{
id: 'profession-intro2',
audioSrc: getPublicPath('audio/py_3_005.MP3'),
content: '那么,让我们一起来拆解访谈作品的核心技能吧!'
}
]
}
return []
})
const showIntroGuide = computed(() => introGuideSteps.value.length > 0)
const handleIntroGuideDone = () => {
playing.value = true
}
// 步骤导航数据
const navigationSteps = ref([
{
id: 'step1',
label: '拍摄执行',
content: '基础景别应用',
content: '机位设置',
videoUrl: getPublicPath('video/interview/work/ftmk_jwsz_batch.mp4'),
type: 'shooting' as const
},
{
id: 'step2',
label: '拍摄执行',
content: '画面构图',
content: '轴线原则',
videoUrl: getPublicPath('video/interview/work/ftmk_zxyz_batch.mp4'),
type: 'shooting' as const
},
{
id: 'step3',
label: '内容策划',
content: '简单脚本策划',
content: '镜头组接逻辑',
videoUrl: getPublicPath('video/interview/work/ftmk_jtzjlj_batch.mp4'),
type: 'planning' as const
},
{
id: 'step4',
label: '拍摄执行',
content: '动态事件跟拍与抓拍',
content: '声音同步与收录',
videoUrl: getPublicPath('video/interview/work/ftmk_sytbysl_batch.mp4'),
type: 'shooting' as const
},
{
id: 'step5',
label: '后期制作',
content: '素材导入、剪辑拼接',
type: 'post' as const
}
])
@@ -68,28 +97,27 @@ const showStepNavigation = ref(false)
const currentNavigationStep = ref(1) // 对应视频索引,从0开始
// 视频列表
const videoList = [second, third, fourth, five, six]
const currentVideoIndex = ref(0)
//按顺序播放
const currentVideo = computed(() => videoList[currentVideoIndex.value])
const currentVideo = computed(() => navigationSteps.value[currentVideoIndex.value].videoUrl)
const resolvedSrc = computed(() => {
if (key.value === 'case') return '/video/anlishangxi_meishi_xiaoyuanzi.mp4'
if (key.value === 'case') return '/video/interview/work/ft_zylt.mp4'
if (key.value === 'profession') return currentVideo.value
return ''
})
const handleVideoChange = () => {
if (currentVideoIndex.value < videoList.length - 1) {
if (currentVideoIndex.value < navigationSteps.value.length - 1) {
currentVideoIndex.value++
currentNavigationStep.value = currentVideoIndex.value
} else {
status.value = true
steps.value = [
{
id: 'step1',
content: '恭喜你,已完成专业剖析的学习,点击【查看脚本】回顾视频脚本吧!'
}
]
// status.value = true
// steps.value = [
// {
// id: 'step1',
// content: '恭喜你,已完成专业剖析的学习,点击【查看脚本】回顾视频脚本吧!'
// }
// ]
return
}
nextTick(() => {
@@ -102,7 +130,8 @@ const handleClose = () => {
if (key.value === 'idea') {
interview.setInterviewUnlockProgress(1)
router.push({
name: 'Interview'
name: 'Interview',
query: { guide: 'return' }
})
return
}
@@ -202,6 +231,15 @@ onMounted(() => {
</div>
</div>
<!-- 进入案例赏析 / 专业剖析时显示引导 -->
<GuideSteps
v-if="showIntroGuide"
:steps="introGuideSteps"
position-offset-y="85%"
@complete="handleIntroGuideDone"
@skip="handleIntroGuideDone"
/>
<!-- 引导与高亮 -->
<GuideSteps v-if="status" :steps="steps" position-offset-y="85%" @complete="handleComplete" />