|
@@ -7,7 +7,7 @@
|
|
|
<div class="yhfk-btn" @click="openYHFK">用户反馈</div>
|
|
|
<!-- 智小青 -->
|
|
|
<div class="zxq-btn" @click="openZXQ"></div>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
<div class="zxqIframeContainer" v-if="isShowZXQ">
|
|
|
<div class="close" @click="closeZXQ">×</div>
|
|
@@ -196,8 +196,29 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$refs.kdyjs.open();
|
|
|
+ // 监听message事件
|
|
|
+ window.addEventListener('message', this.handleMessage);
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ // 在组件销毁前移除事件监听器
|
|
|
+ window.removeEventListener('message', this.handleMessage);
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleMessage(event) {
|
|
|
+ // // 确保消息来自预期的源
|
|
|
+ // // 如果需要更严格的安全性,请验证event.origin
|
|
|
+ // if (event.source !== window.parent) {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // 处理接收到的消息数据
|
|
|
+ const data = event.data;
|
|
|
+ // const imgUrl = data.imgUrl;
|
|
|
+ // const otherParam = data.otherParam;
|
|
|
+
|
|
|
+ // 在Vue父组件中处理数据
|
|
|
+ // ...
|
|
|
+ },
|
|
|
changeModel(status) {
|
|
|
mapTriggerEvent("changeModel", {
|
|
|
status: status
|
|
@@ -472,7 +493,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- debugger
|
|
|
+ // debugger
|
|
|
}
|
|
|
},
|
|
|
// 经纬度转屏幕坐标
|