fix(StudyDetailPage): 修复图片附件或无附件课程的学习时长埋点问题
在课程类型为图片或无类型时,进入页面后立即执行学习时长埋点记录
Showing
1 changed file
with
11 additions
and
1 deletions
| ... | @@ -398,6 +398,16 @@ const handleLessonClick = async (lesson) => { | ... | @@ -398,6 +398,16 @@ const handleLessonClick = async (lesson) => { |
| 398 | bottomWrapperHeight.value = bottomWrapper.clientHeight + 'px'; | 398 | bottomWrapperHeight.value = bottomWrapper.clientHeight + 'px'; |
| 399 | } | 399 | } |
| 400 | }); | 400 | }); |
| 401 | + | ||
| 402 | + // 图片附件或者附件不存在 | ||
| 403 | + // 进入后直接执行学习时长埋点 | ||
| 404 | + if(course.value?.course_type === 'image' || !course.value?.course_type) { | ||
| 405 | + // 新增记录 | ||
| 406 | + let paramsObj = { | ||
| 407 | + schedule_id: courseId.value, | ||
| 408 | + } | ||
| 409 | + addRecord(paramsObj); | ||
| 410 | + } | ||
| 401 | } | 411 | } |
| 402 | }; | 412 | }; |
| 403 | 413 | ||
| ... | @@ -479,7 +489,7 @@ onMounted(async () => { | ... | @@ -479,7 +489,7 @@ onMounted(async () => { |
| 479 | addRecord(paramsObj); | 489 | addRecord(paramsObj); |
| 480 | } | 490 | } |
| 481 | } | 491 | } |
| 482 | -}) | 492 | +}); |
| 483 | 493 | ||
| 484 | // 提交评论 | 494 | // 提交评论 |
| 485 | // 切换点赞状态 | 495 | // 切换点赞状态 | ... | ... |
-
Please register or login to post a comment