feat: 更新视频播放器组件,添加章节视频功能并优化返回逻辑

This commit is contained in:
2026-04-09 16:48:57 +08:00
parent 943cc862fc
commit 17022d498a
19 changed files with 1192 additions and 1599 deletions

View File

@@ -6,11 +6,12 @@
<!-- 页面内容 -->
<view class="page-content">
<!-- 课程视频 -->
<AliPlayer
<CourseVideo
:video-list="videoList"
:current-index="currentVideoIndex !== null ? currentVideoIndex : 0"
:course="{courseTitle:courseTitle, chapterTitle: chapterTitle}"
:cover="curriculumImgUrl || ''"
:http="mainClient"
/>
<!-- 选项卡 -->
@@ -49,10 +50,15 @@
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { courseApi } from '@/api/modules/course'
import AliPlayer from '@/components/ali-video/index.vue'
import type { IChapterDetail } from '@/types/course'
import type { IVideoInfo } from '@/types/video'
import { mainClient } from '@/api/clients'
import CourseVideo from '@/components/course/chapter-video.vue'
import { useSafeBack } from '@/components/nav-bar/use-safe-back'
useSafeBack()
// 页面参数
const chapterId = ref<number>(0)
const courseTitle = ref('')