mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 09:56:45 +08:00
修改考试控制及scorm课件部分
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user