|
@@ -37,25 +37,26 @@
|
|
|
this.$nextTick(()=>{
|
|
|
this.$refs.myvideo.play();
|
|
|
})
|
|
|
- // window.getStatusBarHeightInvoke=(data)=>{
|
|
|
- // localStorage.setItem('safeBottomHeight',data.safeBottomHeight);
|
|
|
- // localStorage.setItem('statusBarHeight',data.statusBarHeight);
|
|
|
- // };
|
|
|
- // window.idfaInvoke=(data)=>{
|
|
|
- // localStorage.setItem('idfa',data.idfa);
|
|
|
- // };
|
|
|
- // window.deviceInfoInvoke=(data)=>{
|
|
|
- // localStorage.setItem('deviceInfo',data.data);
|
|
|
- // };
|
|
|
- // window.deviceTokenInvoke=(data)=>{
|
|
|
- // if(data.code===1){
|
|
|
- // localStorage.setItem('deviceToken',data.deviceId)
|
|
|
- // }
|
|
|
- // };
|
|
|
- // this.getStatusBarHeight();
|
|
|
- // this.getIDFA();
|
|
|
- // this.getDeviceInfo();
|
|
|
- // this.getDeviceToken();
|
|
|
+ window.getStatusBarHeightInvoke=(data)=>{
|
|
|
+ localStorage.setItem('safeBottomHeight',data.safeBottomHeight);
|
|
|
+ localStorage.setItem('statusBarHeight',data.statusBarHeight);
|
|
|
+ this.$toast(data.statusBarHeight);
|
|
|
+ };
|
|
|
+ window.idfaInvoke=(data)=>{
|
|
|
+ localStorage.setItem('idfa',data.idfa);
|
|
|
+ };
|
|
|
+ window.deviceInfoInvoke=(data)=>{
|
|
|
+ localStorage.setItem('deviceInfo',data.data);
|
|
|
+ };
|
|
|
+ window.deviceTokenInvoke=(data)=>{
|
|
|
+ if(data.code===1){
|
|
|
+ localStorage.setItem('deviceToken',data.deviceId)
|
|
|
+ }
|
|
|
+ };
|
|
|
+ this.getStatusBarHeight();
|
|
|
+ this.getIDFA();
|
|
|
+ this.getDeviceInfo();
|
|
|
+ this.getDeviceToken();
|
|
|
},
|
|
|
methods: {
|
|
|
onVideoPause(){//解决切换页面视频自动暂停
|
|
@@ -70,38 +71,38 @@
|
|
|
toPrivate(){
|
|
|
window.location.href=protocal.privacy;
|
|
|
},
|
|
|
- // getStatusBarHeight(){//获取状态栏和底部安全距离
|
|
|
- // window.webkit.messageHandlers.call.postMessage({
|
|
|
- // api:"com.js.getStatusBarHeight",
|
|
|
- // data:{
|
|
|
- // url:''
|
|
|
- // },
|
|
|
- // 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:{
|
|
|
- // info:['idfa','platform','resolution','brand','ov','cate','appId','lang','currTime','av','model','deviceCode']
|
|
|
- // },
|
|
|
- // callback:'deviceInfoInvoke'
|
|
|
- // })
|
|
|
- // },
|
|
|
- // getDeviceToken(){
|
|
|
- // window.webkit.messageHandlers.call.postMessage({
|
|
|
- // api:"com.js.deviceToken",
|
|
|
- // data:{},
|
|
|
- // callback:'deviceTokenInvoke'
|
|
|
- // })
|
|
|
- // },
|
|
|
+ getStatusBarHeight(){//获取状态栏和底部安全距离
|
|
|
+ window.webkit.messageHandlers.call.postMessage({
|
|
|
+ api:"com.js.getStatusBarHeight",
|
|
|
+ data:{
|
|
|
+ url:''
|
|
|
+ },
|
|
|
+ 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:{
|
|
|
+ info:['idfa','platform','resolution','brand','ov','cate','appId','lang','currTime','av','model','deviceCode']
|
|
|
+ },
|
|
|
+ callback:'deviceInfoInvoke'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDeviceToken(){
|
|
|
+ window.webkit.messageHandlers.call.postMessage({
|
|
|
+ api:"com.js.deviceToken",
|
|
|
+ data:{},
|
|
|
+ callback:'deviceTokenInvoke'
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|