浏览代码

【测试postmessa通信】

master
GL 4 年前
父节点
当前提交
2fb8686127
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. +4
    -5
      src/views/login/index.vue

+ 4
- 5
src/views/login/index.vue 查看文件

@@ -43,7 +43,7 @@ export default {
loginImgUrl: require('../../assets/images/logo.png'),
username: '18872592633',
password: '123456GD',
appId:'',
};
},
created() {
@@ -57,7 +57,7 @@ export default {
data: {
phone: val.userName,
password: val.password,
appId: "wx9ff823abeef23b94",
appId: this.appId,
// latitude: 34.51685,
// longitude: 110.89456,
}
@@ -75,10 +75,9 @@ export default {
},
mounted() {
console.log(123);
//接收 父级盒子传入的appid
window.addEventListener('message',function(event){
console.log(event,'++////***');
console.log( "收到" + event.origin + "消息:" + event.data);
this.appId = event.data
}, false);
},
};


正在加载...
取消
保存