diff --git a/components/course-homework/course-homework.vue b/components/course-homework/course-homework.vue index 8352e96..0fd2b46 100644 --- a/components/course-homework/course-homework.vue +++ b/components/course-homework/course-homework.vue @@ -166,7 +166,6 @@ } let pamars = { - studyItemId: this.studyItemId,//学习内容记录id, studyId: this.studyId,//学习id, courseId: this.content.courseId,//课程id, contentId: this.content.id,//内容id, @@ -177,6 +176,9 @@ hwAnswer: this.answer,//文本提交的信息 score: 0 } + if(this.studyItemId){ + pamars.studyItemId=this.studyItemId;//学习内容记录id, + } apiCourseStudy.saveHomework(pamars).then(res=>{ if(res.status==200){ //this.$refs.messager.show({message:'作业已提交',type:'success'})