Merge remote-tracking branch 'boe/dev0515' into dev0515

This commit is contained in:
zhangsir
2024-05-30 09:07:05 +08:00
2 changed files with 22 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="box">
<div class="box" :class="{ incl: url.includes('projectdetails') }">
<portal-header style="background: #387DF7;" :hideSearch="true" textColor="#ffffff"></portal-header>
<iframe :src="url" style="width: 100%;height: 100%;" frameborder="0"></iframe>
<iframe :src="url" style="width: 100%;height: 100%;" frameborder="0" ref="iframe"></iframe>
<portal-footer></portal-footer>
</div>
</template>
@@ -27,9 +27,23 @@ import portalFooter from "@/components/PortalFooter.vue";
if(params){
this.url=this.url+'?'+params;
}
window.addEventListener('message', this.handleMessageFromChild);
},
beforeDestroy() {
window.removeEventListener('message', this.handleMessageFromChild);
},
methods:{
handleMessageFromChild(event) {
if (event.origin !== process.env.VUE_APP_BOE_MOBILE_URL) return;
if (event.data && event.data.type === 'navigate') {
this.navigate(event.data.path);
}
},
navigate(path) {
this.$router.push({
path:path
})
},
}
}
</script>
@@ -39,4 +53,8 @@ import portalFooter from "@/components/PortalFooter.vue";
//background: #387DF7;
height: 100%;
}
.incl{
overflow: hidden;
padding-bottom: 100px;
}
</style>

View File

@@ -607,6 +607,7 @@
this.saveStudyDuration();
if (r.contentType == 10 || r.contentType == 20) {
this.trueFalse = true
if (r.content.startsWith('\{')) {
this.curriculumData = JSON.parse(r.content);
} else {
@@ -1190,7 +1191,6 @@
audiences:this.audiences
}).then(rs => {
if (rs.status == 200) {
this.contentStudysLength = rs.result.contentStudys
if(rs.result.contents.length==0){
$this.$message.error('课程内容已删除或课程已不再使用');
return;