|
@@ -1,38 +1,36 @@
|
|
<template>
|
|
<template>
|
|
- <div class="right-wrap" style="display: flex;justify-content: center;align-items: center;">
|
|
|
|
- <iframe id="iframe" frameborder="0" style="width:900px;height:500px;margin-top: 20px;margin-bottom: 20px;" :src="src"></iframe>
|
|
|
|
|
|
+ <div class="timeline-container">
|
|
|
|
+ <div class="timeline-content">
|
|
|
|
+ <div class="timeline-entry-list">
|
|
|
|
+ <div class="gameBox">
|
|
|
|
+ <iframe id="iframe" frameborder="0" :src="src" style="width: 100%;height: 100%;"></iframe>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <SiderInfo></SiderInfo>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
|
|
+import SiderInfo from '@/components/SiderInfo.vue'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
-export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- src: this.$route.query.activityUrl, //需要加载的子页面url
|
|
|
|
|
|
+export default{
|
|
|
|
+ components: {
|
|
|
|
+ SiderInfo
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ src: this.$route.query.url ? this.$route.query.url : '', //需要加载的子页面url
|
|
actId:this.$route.query.actId
|
|
actId:this.$route.query.actId
|
|
};
|
|
};
|
|
- },
|
|
|
|
- created() {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- async mounted(){
|
|
|
|
|
|
+ },
|
|
|
|
+ created(){},
|
|
|
|
+ async mounted(){
|
|
var that = this
|
|
var that = this
|
|
- this.iframe = document.getElementById('iframe')
|
|
|
|
|
|
+ this.iframe = document.getElementById('iframe');
|
|
this.iframe.onload = function(){
|
|
this.iframe.onload = function(){
|
|
// iframe加载完成后要进行的操作
|
|
// iframe加载完成后要进行的操作
|
|
that.postMsg()
|
|
that.postMsg()
|
|
- }
|
|
|
|
- // if (iframe.attachEvent){ // 兼容IE写法
|
|
|
|
- // iframe.attachEvent("onload", function(){
|
|
|
|
- // // iframe加载完成后要进行的操作
|
|
|
|
- // that.postMsg()
|
|
|
|
- // })
|
|
|
|
- // } else {
|
|
|
|
- // iframe.onload = function(){
|
|
|
|
- // // iframe加载完成后要进行的操作
|
|
|
|
- // that.postMsg()
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ };
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async postMsg() {
|
|
async postMsg() {
|
|
@@ -46,11 +44,24 @@ export default {
|
|
this.iframe.contentWindow.postMessage(param,'*')
|
|
this.iframe.contentWindow.postMessage(param,'*')
|
|
},
|
|
},
|
|
}
|
|
}
|
|
-};
|
|
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
-.right-wrap {
|
|
|
|
|
|
+.timeline-container{
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+}
|
|
|
|
+.timeline-entry-list{
|
|
|
|
+ margin-right: 17.5rem;
|
|
|
|
+ border-radius: 2px;
|
|
|
|
+
|
|
|
|
+ position: relative;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
|
|
+.timeline-entry-list .gameBox{
|
|
|
|
+ width: 720px;
|
|
|
|
+ height: 720px;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
-
|
|
|
|
|
|
+</style>
|