mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 13:26:44 +08:00
pdf为空加载异常
This commit is contained in:
@@ -360,17 +360,25 @@ export default {
|
|||||||
}
|
}
|
||||||
} else if(r.contentType == 40) {
|
} else if(r.contentType == 40) {
|
||||||
//let url = this.fileBaseUrl + r.content;
|
//let url = this.fileBaseUrl + r.content;
|
||||||
if(r.content!='' && r.content.indexOf('.pdf')==-1){
|
if(r.content!='' && r.content.indexOf('.pdf')==-1){
|
||||||
apiCourseFile.detail(r.contentRefId).then(cfrs=>{
|
apiCourseFile.detail(r.contentRefId).then(cfrs=>{
|
||||||
if(cfrs.status==200){
|
if(cfrs.status==200){
|
||||||
r.content=cfrs.result.previewFilePath;
|
r.content=cfrs.result.previewFilePath;
|
||||||
//console.log(r.content);
|
//console.log(r.content);
|
||||||
}else{
|
}else{
|
||||||
$this.$message.error('加载pdf课件文件失败');
|
$this.$message.error('加载pdf课件文件失败');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(r.content==''){
|
||||||
|
apiCourseFile.detail(r.contentRefId).then(cfrs=>{
|
||||||
|
if(cfrs.status==200){
|
||||||
|
r.content=cfrs.result.previewFilePath;
|
||||||
|
}else{
|
||||||
|
$this.$message.error('加载pdf课件文件失败');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.contentData = r;
|
this.contentData = r;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user