|
...
|
...
|
@@ -85,16 +85,24 @@ Page({ |
|
|
|
this.getClassNameFlag=true;
|
|
|
|
//this.getPos();
|
|
|
|
if(this.data.hasSuggestion) return;
|
|
|
|
await getApp().getSystemInfo();
|
|
|
|
let sys=getApp().system;
|
|
|
|
if(sys.system.toLowerCase().indexOf('ios')>-1){
|
|
|
|
//导航栏自适应
|
|
|
|
let systemInfo = wx.getSystemInfoSync();
|
|
|
|
let reg = /ios/i;
|
|
|
|
let pt = 20;//导航状态栏上内边距
|
|
|
|
let h = 44;//导航状态栏高度
|
|
|
|
if(reg.test(systemInfo.system)){
|
|
|
|
pt = systemInfo.statusBarHeight;
|
|
|
|
h = 44;
|
|
|
|
this.transverseViewHeight=transverseViewHeight+20;
|
|
|
|
}else{
|
|
|
|
pt = systemInfo.statusBarHeight;
|
|
|
|
h = 48;
|
|
|
|
}
|
|
|
|
console.log('onShow',sys,sys.windowHeight,sys.windowHeight-this.transverseViewHeight)
|
|
|
|
console.log('onShow',systemInfo,systemInfo.windowHeight,systemInfo.windowHeight-this.transverseViewHeight)
|
|
|
|
this.setData({
|
|
|
|
[`map.height`]: sys.windowHeight-this.transverseViewHeight,
|
|
|
|
searchAddrTop:sys.statusBarHeight
|
|
|
|
*(sys.system.toLowerCase().indexOf('ios')>-1?2:sys.pixelRatio),
|
|
|
|
[`map.height`]: systemInfo.windowHeight-this.transverseViewHeight,
|
|
|
|
statusBarHeight: pt,
|
|
|
|
titleBarHeight:h,
|
|
|
|
})
|
|
|
|
this.getPos();
|
|
|
|
},
|
...
|
...
|
|