From 17d461cdc4fc138a6151d8e163d718fd9f7e2020 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Mon, 27 May 2024 20:29:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=AF=BE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/assess.vue | 17 +++++++++++++++++ src/components/Course/exam.vue | 31 +++++++++++++++++++++++++++++++ src/views/study/coursenew.vue | 6 ++++-- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/components/Course/assess.vue b/src/components/Course/assess.vue index a6535d91..01ff1710 100644 --- a/src/components/Course/assess.vue +++ b/src/components/Course/assess.vue @@ -60,6 +60,10 @@ content:{ type: Object, default: ()=>{} + }, + courseType:{ + type: String, + default: 0 } }, data(){ @@ -159,6 +163,19 @@ this.$message.error(res.message); } }) + if(this.courseType == 20){ + let params = { + studyId: this.studyId, //学习id, + courseId: this.content.courseId, //课程id, + contentId: this.content.id, //内容id, + contentType: '', + contentName: '', //内容名称 + progress: 100, + status: 9, + contentTotal: '' + }; + apiCourseStudy.studyContent(params) + } } } } diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index 2b743b04..c3c74896 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -152,6 +152,10 @@ export default { showTest:{ type:Boolean, default:false + }, + courseType:{ + type: String, + default:0 } }, data() { @@ -512,6 +516,33 @@ export default { }, submitTest(testScore){ //提交处理 //清空提示 + if(this.courseType == 20){ + if(testScore<80){ + const params = { + studyId: this.studyId, //学习id, + courseId: this.content.courseId, //课程id, + contentId: this.content.id, //内容id, + contentType: '', + contentName: '', //内容名称 + progress: 1, + status: 2, + contentTotal: '' + }; + apiStudy.studyContent(params) + }else{ + const params = { + studyId: this.studyId, //学习id, + courseId: this.content.courseId, //课程id, + contentId: this.content.id, //内容id, + contentType: '', + contentName: '', //内容名称 + progress: 100, + status: 9, + contentTotal: '' + }; + apiStudy.studyContent(params) + } + } if(this.timer){ window.clearInterval(this.timer); } diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index fa0012fc..c489d57f 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -102,10 +102,10 @@
- +
- +
@@ -320,6 +320,7 @@ }, data() { return { + courseType: 0, trueFalse: true, audiences:'', isCrowd:false, @@ -1190,6 +1191,7 @@ audiences:this.audiences }).then(rs => { if (rs.status == 200) { + this.courseType = rs.result.course.type this.contentStudysLength = rs.result.contentStudys if(rs.result.contents.length==0){ $this.$message.error('课程内容已删除或课程已不再使用');