diff --git a/src/views/productsMsg/components/productInfo.vue b/src/views/productsMsg/components/productInfo.vue index 1aa5fce..b5c0839 100644 --- a/src/views/productsMsg/components/productInfo.vue +++ b/src/views/productsMsg/components/productInfo.vue @@ -6,6 +6,7 @@ :src="url" frameborder="0" style="width: 100%; height: 100%" + id="iframes" > @@ -16,15 +17,30 @@ export default { iframViewStyle: { height: "", }, - - url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation?type=${ - this.$route.query.type - }&flag=${this.$route.query.flag}&data=${ - this.$route.query.data - }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}`, + // url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation?type=${ + // this.$route.query.type + // }&flag=${this.$route.query.flag}&data=${ + // this.$route.query.data + // }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}`, + url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation` }; }, methods: {}, + created() { + this.$nextTick(() => { + let oFrame = this.$refs.iframes; + oFrame.contentWindow.postMessage( + { + type: this.$route.query.type, + flag: this.$route.query.flag, + data: this.$route.query.data, + token: localStorage.getItem("MSSM-LIAONING__TOKEN"), + }, + "*" + ); + }); + }, + methods: {}, mounted() { this.$nextTick(() => { let dom = document.getElementsByClassName("ifram-view");