diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue
index 594043bb..eb354891 100644
--- a/src/components/Course/auditCourse1.vue
+++ b/src/components/Course/auditCourse1.vue
@@ -179,9 +179,9 @@
@@ -623,21 +623,18 @@ export default {
}
}
if($this.coursewareInfo.content.contentType == 40) {
- //console.log(con.content,'con.content');
- // if(con.content != '' && con.content.indexOf('.pdf') > -1) {
- // $this.coursewareInfo.content.content = con.content;
- // }else {
apiCourseFile.detail(con.contentRefId).then(cfrs => {
if (cfrs.status == 200) {
$this.coursewareInfo.content.content = cfrs.result.previewFilePath;
$this.curCFile=cfrs.result;
$this.converStatus = cfrs.result.converStatus;
-
+ //以下是为了兼容老数据
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('.pdf') > -1) {
$this.coursewareInfo.content.content = cfrs.result.filePath;
}
+ //设置状态值
if($this.coursewareInfo.content.content && $this.coursewareInfo.content.content.indexOf('.pdf') > -1){
- if(cfrs.result.converStatus || cfrs.result.converStatus<2){
+ if(!cfrs.result.converStatus || cfrs.result.converStatus<2){
$this.converStatus=2;//转化完成
}
}
@@ -645,7 +642,6 @@ export default {
$this.$message.error('加载pdf课件文件失败');
}
});
- // }
}
} else if (con.sortIndex == 2) {
$this.homeworkInfo = con;
diff --git a/src/components/Course/auditCourse2.vue b/src/components/Course/auditCourse2.vue
index 2f740e74..2653c26b 100644
--- a/src/components/Course/auditCourse2.vue
+++ b/src/components/Course/auditCourse2.vue
@@ -679,30 +679,28 @@ export default {
this.curriculumData.url = r.content
}
} else if(r.contentType == 40) {
- this.contentData.content="";
- // if (r.content != '' && r.content.indexOf('.pdf') > -1) {
- // // this.contentData.content = cfrs.result.previewFilePath;
- // }else{
+ this.contentData.content="";
apiCourseFile.detail(r.contentRefId).then(cfrs => {
if (cfrs.status == 200) {
+ this.curCFile=cfrs.result;
this.contentData.content = cfrs.result.previewFilePath;
this.converStatus = cfrs.result.converStatus;
- this.curCFile=cfrs.result;
+ //下面是为了兼容老数据
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) {
this.contentData.content = cfrs.result.filePath;
}
+ //设置状态
if(this.contentData.content && this.contentData.content.indexOf('pdf') > -1){
- if(this.converStatus || this.converStatus<2){
- this.converStatus=2;
+ if(!this.converStatus || this.converStatus<2){
+ this.converStatus=2;
}
}
//console.log(r.content);
}else {
- this.contentData.content="";
this.$message.error('加载pdf课件文件失败');
}
});
- // }
+
}
this.type = 0;
},
diff --git a/src/components/Course/collectItem.vue b/src/components/Course/collectItem.vue
index bb0998a5..05c9af80 100644
--- a/src/components/Course/collectItem.vue
+++ b/src/components/Course/collectItem.vue
@@ -139,8 +139,9 @@ export default {