修改考试控制及scorm课件部分

This commit is contained in:
daihh
2023-01-03 18:18:26 +08:00
parent e404e980a5
commit 3af2d10631
6 changed files with 93 additions and 7 deletions

View File

@@ -82,6 +82,9 @@
</view>
<view v-if="articleMore" @click="showMore" style="text-align: center;color: #387DF7;"><text>查看更多</text> </view>
</view>
<div v-if="curContent.contentType == 50" style="min-height: 500px;">
<web-view v-if="scormUrl" :src="scormUrl" frameborder="0" scrolling="no" border="0px" style="width:100%;height:100%;border:0px;"></web-view>
</div>
<view v-if="curContent.contentType==52">
<!--外连接-->
<view v-if="conLink.url!=''" style="min-height: 400px;position: relative;">
@@ -395,6 +398,7 @@
</template>
<script>
import config from '@/config/index.js'
import apiCoursePortal from '@/api/modules/coursePortal.js'
import apiCourseStudy from '@/api/modules/courseStudy.js'
import apiVideoStudy from "@/api/modules/videoStudy.js";
@@ -473,7 +477,8 @@
localTimeKey:'boeu-study-time' ,//本地存储的学习时长的key json格式
localTimeValue:0,//计算的时间
appendStudyOtherHandle:null,
articleMore:true
articleMore:true,
scormUrl:'',
}
},
computed: {
@@ -813,6 +818,7 @@
},
//更换播放内容
changePlayRes(con){
this.scormUrl='';//清空地址
this.articleMore=true;
this.clearTimeHandle();
// console.log(con,'con');
@@ -831,6 +837,29 @@
}
});
}
}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模块自动根据学习记录定位
let urlPre=window.location.protocol;
let configUrl=config.scormPlayer;
configUrl=urlPre+configUrl.substring(configUrl.indexOf(':')+1);
this.scormUrl=configUrl+pars;//播放的首页
}
});
}else if(con.contentType==52){
if(con.content.startsWith('\{')){
this.conLink=JSON.parse(con.content);