Commit 5a379529 authored by danfuman's avatar danfuman

修改

parent 02957a31
...@@ -12,7 +12,7 @@ import { encodeStr } from "@/assets/js/common"; ...@@ -12,7 +12,7 @@ import { encodeStr } from "@/assets/js/common";
import MaxPageSizeTip from "@/views/components/MaxPageSizeTip.vue"; import MaxPageSizeTip from "@/views/components/MaxPageSizeTip.vue";
import { getUipIdByCid } from '@/api/macro/macro'; import { getUipIdByCid } from '@/api/macro/macro';
export default { export default {
name: 'Subscribe', name: 'collection',
components: { components: {
MaxPageSizeTip MaxPageSizeTip
}, },
......
<template> <template>
<div v-loading="loading" class="market-container"> <div v-loading="loading" class="market-container">
<iframe id="companyIframe" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="100%" :style="{height:iframeHight+'px'}" <iframe id="companyIframe" class="market-iframe" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="100%" :src="src" />
:src="src" />
</div> </div>
</template> </template>
...@@ -36,11 +35,12 @@ export default { ...@@ -36,11 +35,12 @@ export default {
created() { created() {
this.domain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS; this.domain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS;
this.gettokens(); this.gettokens();
this.iframeObserver();
}, },
mounted() { mounted() {
this.iframeLoading(); // 判断iframe页面是否加载完成-当前页控制 this.iframeLoading(); // 判断iframe页面是否加载完成-当前页控制
window.addEventListener('message', this.linkListener, false); window.addEventListener('message', this.linkListener, false);
steerScroll('companyIframe', this.navigation, this.footHeight, true); // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略) // steerScroll('companyIframe', this.navigation, this.footHeight, true); // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略)
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.iframeTimer); // -当前页控制 clearInterval(this.iframeTimer); // -当前页控制
...@@ -72,6 +72,14 @@ export default { ...@@ -72,6 +72,14 @@ export default {
} }
} }
}, },
async iframeObserver() {
try {
await this.$nextTick();
this.iframeIns = document.querySelector(".market-iframe");
} catch (error) {
console.log(error);
}
},
gettokens() { gettokens() {
dskAccessToken().then(res => { dskAccessToken().then(res => {
if (res.code == 200) { if (res.code == 200) {
...@@ -134,6 +142,15 @@ export default { ...@@ -134,6 +142,15 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 16px 24px; padding: 16px 24px;
padding-right: 15px;
box-sizing: border-box; box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
.market-iframe {
width: 100%;
height: 100%;
}
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment