|
...
|
...
|
@@ -104,7 +104,7 @@ Page({ |
|
|
|
statusBarHeight: pt,
|
|
|
|
titleBarHeight:h,
|
|
|
|
})
|
|
|
|
this.getPos();
|
|
|
|
this.getPos(systemInfo);
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -141,7 +141,7 @@ Page({ |
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
getPos(){
|
|
|
|
getPos(systemInfo){
|
|
|
|
this._getPos().then(res => {
|
|
|
|
console.log('wx.getLocation.then', res);
|
|
|
|
let map = this.data.map;
|
|
...
|
...
|
@@ -151,8 +151,8 @@ Page({ |
|
|
|
this.user.latitude = res.latitude;
|
|
|
|
this.user.longitude = res.longitude;
|
|
|
|
|
|
|
|
console.log('onShow.getPos',getApp().system.windowHeight,getApp().system.windowHeight-this.transverseViewHeight)
|
|
|
|
map.height = getApp().system.windowHeight-this.transverseViewHeight
|
|
|
|
console.log('onShow.getPos',systemInfo,getApp().system.windowHeight-this.transverseViewHeight)
|
|
|
|
map.height = systemInfo.windowHeight-this.transverseViewHeight
|
|
|
|
this.setData({
|
|
|
|
map: map,
|
|
|
|
})
|
|
...
|
...
|
@@ -174,7 +174,7 @@ Page({ |
|
|
|
}).show();
|
|
|
|
} else {
|
|
|
|
setTimeout(() => {
|
|
|
|
this.getPos()
|
|
|
|
this.getPos(systemInfo)
|
|
|
|
}, 500)
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|