提交移动端的修改

This commit is contained in:
daihh
2023-03-01 16:27:38 +08:00
parent 72b9a18206
commit 8d2a270fa7
6 changed files with 222 additions and 5 deletions

View File

@@ -84,7 +84,7 @@
</view>
<div v-if="curContent.contentType == 50" style="min-height: 500px;">
<!--因为web-view 动态切换地址不好用所以这里先使用iframe-->
<iframe v-if="scormUrl" :src="scormUrl" frameborder="0" scrolling="no" border="0px" style="width:100%;height:500px;border:0px;"></iframe>
<iframe id="iframe-scorm" v-if="scormUrl" :src="scormUrl" onload="iframeScormLoad()" frameborder="0" scrolling="no" border="0px" style="width:100%;min-height:500px;border:0px;"></iframe>
</div>
<view v-if="curContent.contentType==52">
<!--外连接-->
@@ -577,6 +577,18 @@
window.clearTimeout(this.handleTimeout);
}
},
iframeScormLoad(){
setTimeout(function(){
var scormIframe=document.getElementById('iframe-scorm');
if (scormIframe) {
var iframeWin = scormIframe.contentWindow || scormIframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
scormIframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
}
}
},500);
},
loadMyScore(){
apiCourseGrade.score({courseId:this.courseId}).then(rs=>{
if(rs.status==200){