在线课study回滚

This commit is contained in:
zhangsir
2024-05-28 15:01:48 +08:00
parent 2b323bc6f9
commit d463e896a6
3 changed files with 3 additions and 77 deletions

View File

@@ -60,22 +60,6 @@
content:{ content:{
type: Object, type: Object,
default: ()=>{} default: ()=>{}
},
courseType:{
type: String,
default: 0
},
totalContent:{
type: Number,
default: 0
},
contentName:{
type: String,
default: ''
},
contentType:{
type: String,
default: ''
} }
}, },
data(){ data(){
@@ -175,19 +159,6 @@
this.$message.error(res.message); 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: this.contentType,
contentName: this.contentName, //内容名称
progress: 100,
status: 9,
contentTotal: this.totalContent
};
apiCourseStudy.studyContent(params)
}
} }
} }
} }

View File

@@ -152,22 +152,6 @@ export default {
showTest:{ showTest:{
type:Boolean, type:Boolean,
default:false default:false
},
courseType:{
type: String,
default:0
},
totalContent:{
type: Number,
default:0
},
contentName:{
type: String,
default: ''
},
contentType:{
type: String,
default: ''
} }
}, },
data() { data() {
@@ -528,33 +512,6 @@ export default {
}, },
submitTest(testScore){ //提交处理 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: this.contentType,
contentName: this.contentName, //内容名称
progress: 1,
status: 2,
contentTotal: this.totalContent
};
apiStudy.studyContent(params)
}else{
const params = {
studyId: this.studyId, //学习id,
courseId: this.content.courseId, //课程id,
contentId: this.content.id, //内容id,
contentType: this.contentType,
contentName: this.contentName, //内容名称
progress: 100,
status: 9,
contentTotal: this.totalContent
};
apiStudy.studyContent(params)
}
}
if(this.timer){ if(this.timer){
window.clearInterval(this.timer); window.clearInterval(this.timer);
} }

View File

@@ -102,10 +102,10 @@
<homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework> <homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
</div> </div>
<div v-if="resType == 61"> <div v-if="resType == 61">
<exam :contentName="contentData.contentName" :contentType="contentData.contentType" v-if="resType == 61 && studyId != '' " :totalContent="totalContent" :studyId="studyId" :courseType="courseType" :content="contentData"></exam> <exam v-if="resType == 61 && studyId != '' " :studyId="studyId" :content="contentData"></exam>
</div> </div>
<div v-if="resType == 62" style="padding:5px"> <div v-if="resType == 62" style="padding:5px">
<assess :contentName="contentData.contentName" :contentType="contentData.contentType" v-if="resType == 62 && studyId != '' && contentData.id" :totalContent="totalContent" :courseType="courseType" :studyId="studyId" :content="contentData"> <assess v-if="resType == 62 && studyId != '' && contentData.id" :studyId="studyId" :content="contentData">
</assess> </assess>
</div> </div>
</div> </div>
@@ -320,7 +320,6 @@
}, },
data() { data() {
return { return {
courseType: 0,
trueFalse: true, trueFalse: true,
audiences:'', audiences:'',
isCrowd:false, isCrowd:false,
@@ -608,6 +607,7 @@
this.saveStudyDuration(); this.saveStudyDuration();
if (r.contentType == 10 || r.contentType == 20) { if (r.contentType == 10 || r.contentType == 20) {
this.trueFalse = true
if (r.content.startsWith('\{')) { if (r.content.startsWith('\{')) {
this.curriculumData = JSON.parse(r.content); this.curriculumData = JSON.parse(r.content);
} else { } else {
@@ -1191,8 +1191,6 @@
audiences:this.audiences audiences:this.audiences
}).then(rs => { }).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
this.courseType = rs.result.course.type
this.contentStudysLength = rs.result.contentStudys
if(rs.result.contents.length==0){ if(rs.result.contents.length==0){
$this.$message.error('课程内容已删除或课程已不再使用'); $this.$message.error('课程内容已删除或课程已不再使用');
return; return;