mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
Merge remote-tracking branch 'boe/dev0515' into dev0515
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="box">
|
<div class="box" :class="{ incl: url.includes('projectdetails') }">
|
||||||
<portal-header style="background: #387DF7;" :hideSearch="true" textColor="#ffffff"></portal-header>
|
<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>
|
<portal-footer></portal-footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -27,9 +27,23 @@ import portalFooter from "@/components/PortalFooter.vue";
|
|||||||
if(params){
|
if(params){
|
||||||
this.url=this.url+'?'+params;
|
this.url=this.url+'?'+params;
|
||||||
}
|
}
|
||||||
|
window.addEventListener('message', this.handleMessageFromChild);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
window.removeEventListener('message', this.handleMessageFromChild);
|
||||||
},
|
},
|
||||||
methods:{
|
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>
|
</script>
|
||||||
@@ -39,4 +53,8 @@ import portalFooter from "@/components/PortalFooter.vue";
|
|||||||
//background: #387DF7;
|
//background: #387DF7;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.incl{
|
||||||
|
overflow: hidden;
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -607,6 +607,7 @@
|
|||||||
this.saveStudyDuration();
|
this.saveStudyDuration();
|
||||||
|
|
||||||
if (r.contentType == 10 || r.contentType == 20) {
|
if (r.contentType == 10 || r.contentType == 20) {
|
||||||
|
this.trueFalse = true
|
||||||
if (r.content.startsWith('\{')) {
|
if (r.content.startsWith('\{')) {
|
||||||
this.curriculumData = JSON.parse(r.content);
|
this.curriculumData = JSON.parse(r.content);
|
||||||
} else {
|
} else {
|
||||||
@@ -1190,7 +1191,6 @@
|
|||||||
audiences:this.audiences
|
audiences:this.audiences
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.status == 200) {
|
if (rs.status == 200) {
|
||||||
this.contentStudysLength = rs.result.contentStudys
|
|
||||||
if(rs.result.contents.length==0){
|
if(rs.result.contents.length==0){
|
||||||
$this.$message.error('课程内容已删除或课程已不再使用');
|
$this.$message.error('课程内容已删除或课程已不再使用');
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user