hookehuyr

feat(课程页面): 在任务数据中添加完成状态和打卡子任务ID字段

为课程页面中的任务数据添加is_finish和checkin_subtask_id字段,用于跟踪任务完成状态和关联打卡子任务
...@@ -276,7 +276,9 @@ onMounted(async () => { ...@@ -276,7 +276,9 @@ onMounted(async () => {
276 id: item.id, 276 id: item.id,
277 name: item.title, 277 name: item.title,
278 task_type: item.task_type, 278 task_type: item.task_type,
279 - is_gray: item.is_gray 279 + is_gray: item.is_gray,
280 + is_finish: item.is_finish,
281 + checkin_subtask_id: item.checkin_subtask_id,
280 }); 282 });
281 }); 283 });
282 } 284 }
...@@ -288,7 +290,9 @@ onMounted(async () => { ...@@ -288,7 +290,9 @@ onMounted(async () => {
288 id: item.id, 290 id: item.id,
289 name: item.title, 291 name: item.title,
290 task_type: item.task_type, 292 task_type: item.task_type,
291 - is_gray: item.is_gray 293 + is_gray: item.is_gray,
294 + is_finish: item.is_finish,
295 + checkin_subtask_id: item.checkin_subtask_id,
292 }); 296 });
293 }); 297 });
294 } 298 }
......
...@@ -694,10 +694,12 @@ onMounted(async () => { ...@@ -694,10 +694,12 @@ onMounted(async () => {
694 // 刷新评论列表 694 // 刷新评论列表
695 await refreshComments(); 695 await refreshComments();
696 696
697 - // 获取课程目录 697 + // 获取课程信息
698 const detail = await getCourseDetailAPI({ i: course.value.group_id }); 698 const detail = await getCourseDetailAPI({ i: course.value.group_id });
699 if (detail.code === 1) { 699 if (detail.code === 1) {
700 + // 课程目录
700 course_lessons.value = detail.data.schedule || []; 701 course_lessons.value = detail.data.schedule || [];
702 + // 打卡互动
701 task_list.value = []; 703 task_list.value = [];
702 timeout_task_list.value = []; 704 timeout_task_list.value = [];
703 705
...@@ -708,7 +710,9 @@ onMounted(async () => { ...@@ -708,7 +710,9 @@ onMounted(async () => {
708 id: item.id, 710 id: item.id,
709 name: item.title, 711 name: item.title,
710 task_type: item.task_type, 712 task_type: item.task_type,
711 - is_gray: item.is_gray 713 + is_gray: item.is_gray,
714 + is_finish: item.is_finish,
715 + checkin_subtask_id: item.checkin_subtask_id,
712 }); 716 });
713 }); 717 });
714 } 718 }
...@@ -720,7 +724,9 @@ onMounted(async () => { ...@@ -720,7 +724,9 @@ onMounted(async () => {
720 id: item.id, 724 id: item.id,
721 name: item.title, 725 name: item.title,
722 task_type: item.task_type, 726 task_type: item.task_type,
723 - is_gray: item.is_gray 727 + is_gray: item.is_gray,
728 + is_finish: item.is_finish,
729 + checkin_subtask_id: item.checkin_subtask_id,
724 }); 730 });
725 }); 731 });
726 } 732 }
......