mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
在线课添加状态
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user