fix -- 完成任务bug

This commit is contained in:
yuping
2023-02-23 01:41:06 +08:00
parent 1c6c2fbd9d
commit c0448c5dec

View File

@@ -714,32 +714,16 @@ async function toFinish(d, sName, chapterOrStageId) {
}
//更新学员当前任务
await request(UPDATE_CURRENT_TASK, {id: d.id, type: PROJECT, pid: projectId, name: d.name})
if (d.type == 3 || d.type == 7) {
if (d.type == 3 || d.type == 7 || (d.type === 5 && d.examType === 2)) {
d.status !== 1 && await request(STUDY_RECORD, {
studentId: userInfo.value.projectId,
targetId: data.value.routerId,
logo: PROJECT,
type: PROJECT,
stageOrChapterId: chapterOrStageId,
taskId: d.id,
taskType: d.type,
});
// 此处判断外链跳转详情界面
if (d.type == 7) {
router.push({
path: '/outerchain',
query: {
id: d.id,
type: PROJECT,
infoId: data.value.projectId,
courseId: d.courseId,
pName: data.value.name,
sName,
chapterOrStageId,
exname: d.name, // 外链名称
},
});
return
}
}
if (typeof TASK_TYPES.path[d.type] === "string") {