diff --git a/pages/study/courseStudy.vue b/pages/study/courseStudy.vue index 82c14c7..3e7f9f7 100644 --- a/pages/study/courseStudy.vue +++ b/pages/study/courseStudy.vue @@ -943,49 +943,54 @@ } }else if(con.contentType==50){ //scorm课件的内容 - apiCourseFile.detail(con.contentRefId).then(cfrs => { - if(cfrs.status==200){ - //this.curCFile = cfrs.result; - //this.scormUrl=cfrs - let pars='?mode=normal&r='+Math.random(); - pars+='&scormId='+cfrs.result.id; - pars+='&courseId='+this.courseId; - pars+='&contentId='+con.id; - pars+='&studentId='+this.userInfo.aid; - pars+='&studentName='+encodeURIComponent(this.userInfo.name); - pars+='&lmsId='+this.studyId; - pars+='&scoId=';//不指定,scorm模块自动根据学习记录定位 - pars+='&r='+Math.random();//加一个随机数,以便重新加载 - let urlPre=window.location.protocol; - let configUrl=config.scormPlayer; - configUrl=urlPre+configUrl.substring(configUrl.indexOf(':')+1); - - this.scormUrl=configUrl+pars;//播放的首页 - console.log(this.scormUrl,'this.scormUrl') - - } - }); - - }else if(con.contentType==52){ - if(con.content.startsWith('\{')){ - this.conLink=JSON.parse(con.content); - }else{ - this.conLink.url=con.content; - this.conLink.openType=1; - } - if (this.conLink.openType == 2) { - //新的窗口直接打开 - location.href=this.conLink.url - } - } else if(con.contentType==10 || con.contentType==20) { - if(con.content.startsWith('\{')){ - var d = JSON.parse(con.content) - // if(d.url=="/course/2024/4/1224670812274712576.mp4") d.isDrag = false - this.curriculumData=d; - }else{ - this.curriculumData.url=con.content; - } - console.log('this.curriculumData:::',this.curriculumData) + apiCourseFile.detail(con.contentRefId).then(cfrs => { + if (cfrs.status == 200) { + //this.curCFile = cfrs.result; + //this.scormUrl=cfrs + let pars = '?mode=normal&r=' + Math.random(); + pars += '&scormId=' + cfrs.result.id; + pars += '&courseId=' + this.courseId; + pars += '&contentId=' + con.id; + pars += '&studentId=' + this.userInfo.aid; + pars += '&studentName=' + encodeURIComponent(this.userInfo.name); + pars += '&lmsId=' + this.studyId; + pars += '&scoId=';//不指定,scorm模块自动根据学习记录定位 + pars += '&r=' + Math.random();//加一个随机数,以便重新加载 + let urlPre = window.location.protocol; + let configUrl = config.scormPlayer; + configUrl = urlPre + configUrl.substring(configUrl.indexOf(':') + 1); + + this.scormUrl = configUrl + pars;//播放的首页 + console.log(this.scormUrl, 'this.scormUrl') + + } + }); + + } else if (con.contentType == 52) { + if (con.content.startsWith('\{')) { + this.conLink = JSON.parse(con.content); + } else { + this.conLink.url = con.content; + this.conLink.openType = 1; + } + if (this.conLink.openType == 2) { + //新的窗口直接打开 + const url = this.conLink.url + if (url.startsWith("/mobile")) { + setTimeout(()=>window.open(url.replace("/mobile", ""), "_top")) + } else { + location.href = url + } + } + } else if (con.contentType == 10 || con.contentType == 20) { + if (con.content.startsWith('\{')) { + var d = JSON.parse(con.content) + // if(d.url=="/course/2024/4/1224670812274712576.mp4") d.isDrag = false + this.curriculumData = d; + } else { + this.curriculumData.url = con.content; + } + console.log('this.curriculumData:::', this.curriculumData) this.blobUrl=this.fileBaseUrl+this.curriculumData.url; this.blobId = con.id;