更新了iframe的url

duhanyu
李劲龙 2 years ago
parent b3672a7f3c
commit b0964d407c

@ -3,10 +3,10 @@
<!-- <span>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span> --> <!-- <span>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span> -->
<!-- <iframe src="https://dev-mssm-liaoning.imian.org.cn/ggfw/#/firmContent/drugInfo" frameborder="0" style="width: 100%;height: 100%;"></iframe> --> <!-- <iframe src="https://dev-mssm-liaoning.imian.org.cn/ggfw/#/firmContent/drugInfo" frameborder="0" style="width: 100%;height: 100%;"></iframe> -->
<iframe <iframe
:src="url" :src="Url"
frameborder="0" frameborder="0"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
id="iframes" ref="iframes"
></iframe> ></iframe>
</div> </div>
</template> </template>
@ -17,28 +17,28 @@ export default {
iframViewStyle: { iframViewStyle: {
height: "", height: "",
}, },
// url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation?type=${ Url: `${location.origin}/ggfw-iframe/#/productinformation?type=${
// this.$route.query.type this.$route.query.type
// }&flag=${this.$route.query.flag}&data=${ }&flag=${this.$route.query.flag}&data=${
// this.$route.query.data this.$route.query.data
// }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}`, }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}`,
url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation`
}; };
}, },
methods: {}, methods: {},
created() { created() {
this.$nextTick(() => { // this.$nextTick(() => {
let oFrame = this.$refs.iframes; // let oFrame = this.$refs.iframes;
oFrame.contentWindow.postMessage( // oFrame.contentWindow.postMessage(
{ // {
type: this.$route.query.type, // type: this.$route.query.type,
flag: this.$route.query.flag, // flag: this.$route.query.flag,
data: this.$route.query.data, // data: this.$route.query.data,
token: localStorage.getItem("MSSM-LIAONING__TOKEN"), // token: localStorage.getItem("MSSM-LIAONING__TOKEN"),
}, // },
"*" // "*"
); // );
}); // });
}, },
methods: {}, methods: {},
mounted() { mounted() {

Loading…
Cancel
Save