|
@@ -34,33 +34,34 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
// https://blog.csdn.net/qq_39024950/article/details/90317738
|
|
|
- let mapFrame = this.$refs["mapFrame"];
|
|
|
- if (mapFrame.attachEvent) {
|
|
|
- console.log('1111');
|
|
|
- //兼容浏览器判断
|
|
|
- mapFrame.attachEvent("onload", function () {
|
|
|
- let iframeWin = mapFrame.contentWindow;
|
|
|
- iframeWin.postMessage(
|
|
|
- {
|
|
|
- method: "getBaseInfo",
|
|
|
- data: "我是vuex state的数据",
|
|
|
- },
|
|
|
- "*"
|
|
|
- );
|
|
|
- });
|
|
|
- } else {
|
|
|
- console.log('222');
|
|
|
- mapFrame.onload = function () {
|
|
|
- let iframeWin = mapFrame.contentWindow;
|
|
|
- iframeWin.postMessage(
|
|
|
- {
|
|
|
- method: "getBaseInfo",
|
|
|
- data: "我是vuex state的数据",
|
|
|
- },
|
|
|
- "*"
|
|
|
- );
|
|
|
- };
|
|
|
- }
|
|
|
+ // let mapFrame = this.$refs["mapFrame"];
|
|
|
+ // if (mapFrame.attachEvent) {
|
|
|
+ // console.log('1111');
|
|
|
+ // //兼容浏览器判断
|
|
|
+ // mapFrame.attachEvent("onload", function () {
|
|
|
+ // let iframeWin = mapFrame.contentWindow;
|
|
|
+ // iframeWin.postMessage(
|
|
|
+ // {
|
|
|
+ // method: "getBaseInfo",
|
|
|
+ // data: "我是vuex state的数据",
|
|
|
+ // },
|
|
|
+ // "*"
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // console.log('222');
|
|
|
+ // mapFrame.onload = function () {
|
|
|
+ // let iframeWin = mapFrame.contentWindow;
|
|
|
+ // iframeWin.postMessage(
|
|
|
+ // {
|
|
|
+ // method: "getBaseInfo",
|
|
|
+ // data: "我是vuex state的数据",
|
|
|
+ // },
|
|
|
+ // "*"
|
|
|
+ // );
|
|
|
+ // };
|
|
|
+ // }
|
|
|
+
|
|
|
},
|
|
|
methods:{
|
|
|
getUserInfo() {
|
|
@@ -71,7 +72,7 @@ export default {
|
|
|
if (res.code == "200") {
|
|
|
console.log("getUserInfo res", res);
|
|
|
this.userInfo = res.data;
|
|
|
- this.iframeUrl =`http://veterhchat.hw.hongweisoft.com/#/pages/login/login?userID=${res.data.id}&type=teacher`
|
|
|
+ this.iframeUrl =`https://veterhchat.hw.hongweisoft.com/#/pages/login/login?userID=${res.data.id}&type=teacher`
|
|
|
}
|
|
|
})
|
|
|
.catch((error) => {
|