|
@@ -97,6 +97,7 @@
|
|
|
@close-game="emit('closeVideo')"
|
|
@close-game="emit('closeVideo')"
|
|
|
@prev-section="playPreviousVideo"
|
|
@prev-section="playPreviousVideo"
|
|
|
@next-section="playNextVideo"
|
|
@next-section="playNextVideo"
|
|
|
|
|
+ @close-overlay="handleMapGameCloseOverlay"
|
|
|
@saveProgress="handleSaveProgress"
|
|
@saveProgress="handleSaveProgress"
|
|
|
></MapGame>
|
|
></MapGame>
|
|
|
|
|
|
|
@@ -132,6 +133,20 @@
|
|
|
@saveProgress="handleSaveProgress"
|
|
@saveProgress="handleSaveProgress"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
|
|
+ <!-- 提示弹窗组件 -->
|
|
|
|
|
+ <PromptPopup
|
|
|
|
|
+ :visible="promptPopupVisible"
|
|
|
|
|
+ @confirm="handlePromptConfirm"
|
|
|
|
|
+ @cancel="handlePromptCancel"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 播放提示组件 -->
|
|
|
|
|
+ <PlayPrompt
|
|
|
|
|
+ :visible="playPromptVisible"
|
|
|
|
|
+ @countdownEnd="handlePlayPromptEnd"
|
|
|
|
|
+ @close="handlePlayPromptClose"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -158,6 +173,8 @@ import VideoPlayer from '@/components/videopage/VideoPlayer.vue'
|
|
|
import DialogComponents from '@/components/videopage/DialogComponents.vue'
|
|
import DialogComponents from '@/components/videopage/DialogComponents.vue'
|
|
|
import PptView from "@/components/PPT/PptView.vue";
|
|
import PptView from "@/components/PPT/PptView.vue";
|
|
|
import ImageView from '@/components/Image/ImageView.vue'
|
|
import ImageView from '@/components/Image/ImageView.vue'
|
|
|
|
|
+import PromptPopup from '@/components/popup/PromptPopup.vue'
|
|
|
|
|
+import PlayPrompt from '@/components/popup/PlayPrompt.vue'
|
|
|
|
|
|
|
|
// AI实验室
|
|
// AI实验室
|
|
|
import TextToText from "@/components/ai/text/TextToText.vue";
|
|
import TextToText from "@/components/ai/text/TextToText.vue";
|
|
@@ -197,6 +214,10 @@ const watchedCourseIds = ref([])
|
|
|
const questionDialogVisible = ref(false)
|
|
const questionDialogVisible = ref(false)
|
|
|
// 当前显示的试题
|
|
// 当前显示的试题
|
|
|
const courseConfig = ref({})
|
|
const courseConfig = ref({})
|
|
|
|
|
+// 最后一节提示弹窗显示状态
|
|
|
|
|
+const promptPopupVisible = ref(false)
|
|
|
|
|
+// 即将播放下一节提示显示状态
|
|
|
|
|
+const playPromptVisible = ref(false)
|
|
|
// 年级id
|
|
// 年级id
|
|
|
const gradeId = ref('')
|
|
const gradeId = ref('')
|
|
|
// 课程大纲id
|
|
// 课程大纲id
|
|
@@ -269,8 +290,24 @@ const handleVideoEnded = () => {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 自动播放下一个
|
|
|
|
|
- // playNextVideo();
|
|
|
|
|
|
|
+ // 检查是否是最后一节
|
|
|
|
|
+ if (props.courseList && props.courseList.length > 0) {
|
|
|
|
|
+ const currentIndex = props.courseList.findIndex(item => item.id === course.value.id)
|
|
|
|
|
+ if (currentIndex === props.courseList.length - 1) {
|
|
|
|
|
+ // 显示提示弹窗
|
|
|
|
|
+ promptPopupVisible.value = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 显示播放提示
|
|
|
|
|
+ playPromptVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 处理播放提示倒计时结束
|
|
|
|
|
+const handlePlayPromptEnd = () => {
|
|
|
|
|
+ playPromptVisible.value = false
|
|
|
|
|
+ // 自动播放下一个视频
|
|
|
|
|
+ playNextVideo();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 处理视频时间更新事件
|
|
// 处理视频时间更新事件
|
|
@@ -320,6 +357,35 @@ const handleSubmitAnswer = ({ selectedOption }) => {
|
|
|
questionDialogVisible.value = false
|
|
questionDialogVisible.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 处理提示弹窗确定按钮
|
|
|
|
|
+const handlePromptConfirm = () => {
|
|
|
|
|
+ promptPopupVisible.value = false
|
|
|
|
|
+ // 触发关闭视频事件,返回列表页
|
|
|
|
|
+ emit('closeVideo')
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 处理提示弹窗取消按钮
|
|
|
|
|
+const handlePromptCancel = () => {
|
|
|
|
|
+ promptPopupVisible.value = false
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 处理播放提示关闭
|
|
|
|
|
+const handlePlayPromptClose = () => {
|
|
|
|
|
+ playPromptVisible.value = false
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 处理 MapGame 组件关闭遮罩层事件
|
|
|
|
|
+const handleMapGameCloseOverlay = () => {
|
|
|
|
|
+ // 检查是否是最后一节
|
|
|
|
|
+ if (props.courseList && props.courseList.length > 0) {
|
|
|
|
|
+ const currentIndex = props.courseList.findIndex(item => item.id === course.value.id)
|
|
|
|
|
+ if (currentIndex !== props.courseList.length - 1) {
|
|
|
|
|
+ // 显示播放提示,准备开始下一节
|
|
|
|
|
+ playPromptVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 处理父组件传递的课程数据
|
|
// 处理父组件传递的课程数据
|
|
|
const handleParentCourseData = (courseData = props.courseData) => {
|
|
const handleParentCourseData = (courseData = props.courseData) => {
|
|
|
if (!courseData) return false;
|
|
if (!courseData) return false;
|