|
@@ -38,9 +38,22 @@
|
|
|
this.$refs.myvideo.play();
|
|
|
})
|
|
|
window.getStatusBarHeightInvoke=(data)=>{
|
|
|
- this.$toast(JSON.stringify(data))
|
|
|
+ localStorage.setItem('safeBottomHeight',data.safeBottomHeight);
|
|
|
+ localStorage.setItem('statusBarHeight',data.statusBarHeight);
|
|
|
};
|
|
|
+ window.idfaInvoke=(data)=>{
|
|
|
+ this.$toast(JSON.stringify(data));
|
|
|
+ };
|
|
|
+ // window.deviceInfoInvoke=(data)=>{
|
|
|
+ // this.$toast(JSON.stringify(data));
|
|
|
+ // };
|
|
|
+ // window.deviceToken=(data)=>{
|
|
|
+ // this.$toast(JSON.stringify(data));
|
|
|
+ // };
|
|
|
this.getStatusBarHeight();
|
|
|
+ this.getIDFA();
|
|
|
+ this.getDeviceInfo();
|
|
|
+ this.getDeviceToken();
|
|
|
},
|
|
|
methods: {
|
|
|
onVideoPause(){//解决切换页面视频自动暂停
|
|
@@ -64,6 +77,27 @@
|
|
|
callback:'getStatusBarHeightInvoke'
|
|
|
})
|
|
|
},
|
|
|
+ getIDFA(){
|
|
|
+ window.webkit.messageHandlers.call.postMessage({
|
|
|
+ api:"com.js.getIDFA",
|
|
|
+ data:{},
|
|
|
+ callback:'idfaInvoke'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDeviceInfo(){
|
|
|
+ window.webkit.messageHandlers.call.postMessage({
|
|
|
+ api:"com.js.getDeviceInfo",
|
|
|
+ data:{},
|
|
|
+ callback:'deviceInfoInvoke'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDeviceToken(){
|
|
|
+ window.webkit.messageHandlers.call.postMessage({
|
|
|
+ api:"com.js.deviceToken",
|
|
|
+ data:{},
|
|
|
+ callback:'deviceTokenInvoke'
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|