From 005b3e627015bcae9f9cfad39e8399c464707a71 Mon Sep 17 00:00:00 2001 From: daihh Date: Thu, 16 Mar 2023 18:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=B8=AApdf=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=88=A4=E6=96=AD=E7=9A=84=E5=81=B6=E5=8F=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/study/courseStudy.vue | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pages/study/courseStudy.vue b/pages/study/courseStudy.vue index 28ac049..5597bbe 100644 --- a/pages/study/courseStudy.vue +++ b/pages/study/courseStudy.vue @@ -863,21 +863,20 @@ // console.log(con,'con'); this.playerBoxShow=false; if(con.contentType==40){ - //如果是文档,需要再次加载pdf + //如果是文档,需要再次加载pdf,之所以不直接判断 con.contentRefId 是为了兼容一期老版本的 if(con.content!='' && con.content.indexOf('.pdf')==-1){ // 先置空,否则会有延迟 con.content = ''; - apiCourseFile.detail(con.contentRefId).then(cfrs=>{ - if(cfrs.status==200){ - con.content=cfrs.result.previewFilePath; - //console.log(r.content); - }else{ - $this.$refs.messager.show({message:'加载pdf课件文件失败',type:'error'}); - } - }); } + apiCourseFile.detail(con.contentRefId).then(cfrs=>{ + if(cfrs.status==200){ + con.content=cfrs.result.previewFilePath; + //console.log(r.content); + }else{ + $this.$refs.messager.show({message:'加载pdf课件文件失败',type:'error'}); + } + }); }else if(con.contentType==50){ //scorm课件的内容 - apiCourseFile.detail(con.contentRefId).then(cfrs => { if(cfrs.status==200){ //this.curCFile = cfrs.result;