|
|
@@ -36,6 +36,7 @@
|
|
|
:currentIndex="course.key || ''"
|
|
|
@timeUpdate="handleVideoTimeUpdate"
|
|
|
@videoEnded="handleVideoEnded"
|
|
|
+ @saveProgress="handleSaveProgress"
|
|
|
/>
|
|
|
<!-- 图片 -->
|
|
|
<ImageView v-if="course.courseContentType === 'image'" :imagePath="course.courseImagePath" altText="课程图片"></ImageView>
|
|
|
@@ -72,6 +73,7 @@
|
|
|
@close-game="emit('closeVideo')"
|
|
|
@prev-section="playPreviousVideo"
|
|
|
@next-section="playNextVideo"
|
|
|
+ @saveProgress="saveBlocklyProgress"
|
|
|
></MapGame>
|
|
|
|
|
|
</template>
|
|
|
@@ -293,7 +295,7 @@ const handleVideoTimeUpdate = ({ currentTime, progressPercentage, courseConfig:
|
|
|
// 保存弹窗问题进度
|
|
|
await saveRecordBlockly({
|
|
|
brpZtId: props.courseData.ztId,
|
|
|
- brpCtId: props.courseData.typeId,
|
|
|
+ brpCtId: props.courseData.bcType,
|
|
|
brpCourseConfigId: config.id,
|
|
|
brpCourseId: courseId.value,
|
|
|
brpType: 'courseQuest',
|
|
|
@@ -442,7 +444,6 @@ onMounted(async () => {
|
|
|
const handleSaveProgress = async (progressData) => {
|
|
|
try {
|
|
|
const { progress, typeId, courseId } = progressData
|
|
|
-
|
|
|
await saveRecordBlockly({
|
|
|
brpZtId: props.courseData.ztId,
|
|
|
brpCtId: typeId,
|
|
|
@@ -454,6 +455,20 @@ const handleSaveProgress = async (progressData) => {
|
|
|
console.error('保存视频进度失败:', error)
|
|
|
}
|
|
|
}
|
|
|
+// 保存bockly进度接口
|
|
|
+const saveBlocklyProgress = async () => {
|
|
|
+ try {
|
|
|
+ await saveRecordBlockly({
|
|
|
+ brpZtId: props.courseData.ztId,
|
|
|
+ brpCtId: props.courseData.bcType,
|
|
|
+ brpCourseId: props.courseData.id,
|
|
|
+ brpType: 'blockly',
|
|
|
+ brpProgress: 100
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.error('保存blockly进度失败:', error)
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
</script>
|
|
|
|