Explorar o código

修复course课程进度接口(统一值传进度)

liyanbo hai 4 meses
pai
achega
7e2997ccb5
Modificáronse 2 ficheiros con 5 adicións e 9 borrados
  1. 0 2
      src/components/videopage/VideoPlayer.vue
  2. 5 7
      src/views/AIPage/AIDevelop.vue

+ 0 - 2
src/components/videopage/VideoPlayer.vue

@@ -54,8 +54,6 @@ import {
 import { videoPlay as Vue3VideoPlay } from 'vue3-video-play'
 import Hls from 'hls.js'
 import { ElMessage } from 'element-plus'
-// 导入全局年级id
-import { globalState } from '@/utils/globalState.js'
 // 导入图标
 import { CloseBold } from '@element-plus/icons-vue'
 

+ 5 - 7
src/views/AIPage/AIDevelop.vue

@@ -247,15 +247,13 @@ const typeSort = ref('')
 const isDisabled = ref(false)
 
   // 保存视频进度接口
-  const handleSaveProgress = async (progressData) => {
+  const handleSaveProgress = async (type, progress) => {
     try {
-      const { progress, gradeId: brpNjId, typeId: brpCtId, courseId: brpCourseId } = progressData
-      
       await saveRecord({
-        brpNjId: brpNjId || globalState.getGradeId(),
-        brpCtId,
-        brpCourseId,
-        brpType: 'course',
+        brpNjId: gradeId.value,
+        brpCtId: typeId.value,
+        brpCourseId: course.value.id,
+        brpType: type,
         brpProgress: progress
       })
     } catch (error) {