Showing
2 changed files
with
6 additions
and
5 deletions
| @@ -104,7 +104,7 @@ Page({ | @@ -104,7 +104,7 @@ Page({ | ||
| 104 | statusBarHeight: pt, | 104 | statusBarHeight: pt, |
| 105 | titleBarHeight:h, | 105 | titleBarHeight:h, |
| 106 | }) | 106 | }) |
| 107 | - this.getPos(); | 107 | + this.getPos(systemInfo); |
| 108 | }, | 108 | }, |
| 109 | 109 | ||
| 110 | /** | 110 | /** |
| @@ -141,7 +141,7 @@ Page({ | @@ -141,7 +141,7 @@ Page({ | ||
| 141 | onShareAppMessage: function () { | 141 | onShareAppMessage: function () { |
| 142 | 142 | ||
| 143 | }, | 143 | }, |
| 144 | - getPos(){ | 144 | + getPos(systemInfo){ |
| 145 | this._getPos().then(res => { | 145 | this._getPos().then(res => { |
| 146 | console.log('wx.getLocation.then', res); | 146 | console.log('wx.getLocation.then', res); |
| 147 | let map = this.data.map; | 147 | let map = this.data.map; |
| @@ -151,8 +151,8 @@ Page({ | @@ -151,8 +151,8 @@ Page({ | ||
| 151 | this.user.latitude = res.latitude; | 151 | this.user.latitude = res.latitude; |
| 152 | this.user.longitude = res.longitude; | 152 | this.user.longitude = res.longitude; |
| 153 | 153 | ||
| 154 | - console.log('onShow.getPos',getApp().system.windowHeight,getApp().system.windowHeight-this.transverseViewHeight) | ||
| 155 | - map.height = getApp().system.windowHeight-this.transverseViewHeight | 154 | + console.log('onShow.getPos',systemInfo,getApp().system.windowHeight-this.transverseViewHeight) |
| 155 | + map.height = systemInfo.windowHeight-this.transverseViewHeight | ||
| 156 | this.setData({ | 156 | this.setData({ |
| 157 | map: map, | 157 | map: map, |
| 158 | }) | 158 | }) |
| @@ -174,7 +174,7 @@ Page({ | @@ -174,7 +174,7 @@ Page({ | ||
| 174 | }).show(); | 174 | }).show(); |
| 175 | } else { | 175 | } else { |
| 176 | setTimeout(() => { | 176 | setTimeout(() => { |
| 177 | - this.getPos() | 177 | + this.getPos(systemInfo) |
| 178 | }, 500) | 178 | }, 500) |
| 179 | } | 179 | } |
| 180 | 180 |
-
Please register or login to post a comment