Commit 5cfa640e authored by danfuman's avatar danfuman

修改

parent 84686eaa
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
this.domain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS; this.domain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS;
this.gettokens(); this.gettokens();
this.iframeObserver(); this.iframeObserver();
window.addEventListener("message", this.pagecapListener, { passive: true });
window.addEventListener('message', this.linkListener, false); window.addEventListener('message', this.linkListener, false);
}, },
mounted() { mounted() {
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
clearInterval(this.iframeTimer); // -当前页控制 clearInterval(this.iframeTimer); // -当前页控制
steerScroll('companyIframe', this.navigation, this.footHeight); // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略) steerScroll('companyIframe', this.navigation, this.footHeight); // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略)
clearInterval(this.tokentimer); clearInterval(this.tokentimer);
window.addEventListener("message", this.pagecapListener, { passive: true });
window.removeEventListener("message", this.linkListener); window.removeEventListener("message", this.linkListener);
// 移除layout样式 // 移除layout样式
this.iframeIns?.contentWindow ? this.iframeIns.contentWindow.postMessage("removeHtmlLayoutStyle", { targetOrigin: this.domain, }) : null; this.iframeIns?.contentWindow ? this.iframeIns.contentWindow.postMessage("removeHtmlLayoutStyle", { targetOrigin: this.domain, }) : null;
...@@ -73,6 +75,17 @@ ...@@ -73,6 +75,17 @@
} }
} }
}, },
// 列表翻页上限
pagecapListener(e) {
const { origin, data } = e;
if (origin != this.domain) return;
if (data == "pageCurrentMaxSize") {
// this.$maxTip("您可通过筛选工具来查询数据~若有更多需求请联系客服 0262798729!").then(({ done, uid }) => {
this.$maxTip("对不起,最多只能访问500页!").then(({ done, uid }) => {
done();
});
}
},
async iframeObserver() { async iframeObserver() {
try { try {
await this.$nextTick(); await this.$nextTick();
......
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