Showing
1 changed file
with
8 additions
and
1 deletions
| @@ -82,6 +82,7 @@ Page({ | @@ -82,6 +82,7 @@ Page({ | ||
| 82 | * 生命周期函数--监听页面显示 | 82 | * 生命周期函数--监听页面显示 |
| 83 | */ | 83 | */ |
| 84 | onShow: async function () { | 84 | onShow: async function () { |
| 85 | + this.getClassNameFlag=true; | ||
| 85 | //this.getPos(); | 86 | //this.getPos(); |
| 86 | if(this.data.hasSuggestion) return; | 87 | if(this.data.hasSuggestion) return; |
| 87 | await getApp().getSystemInfo(); | 88 | await getApp().getSystemInfo(); |
| @@ -194,6 +195,7 @@ Page({ | @@ -194,6 +195,7 @@ Page({ | ||
| 194 | regionchange(e){ | 195 | regionchange(e){ |
| 195 | console.log('regionchange', e) | 196 | console.log('regionchange', e) |
| 196 | if(typeof this.mapCtx=='undefined') return; | 197 | if(typeof this.mapCtx=='undefined') return; |
| 198 | + this.getClassNameFlag=true; | ||
| 197 | this.mapCtx.getScale({ | 199 | this.mapCtx.getScale({ |
| 198 | success: (res) => { | 200 | success: (res) => { |
| 199 | this.mapData.scale = res.scale; | 201 | this.mapData.scale = res.scale; |
| @@ -224,6 +226,7 @@ Page({ | @@ -224,6 +226,7 @@ Page({ | ||
| 224 | }, | 226 | }, |
| 225 | mapUpdated(e){ | 227 | mapUpdated(e){ |
| 226 | console.log('mapUpdated', e) | 228 | console.log('mapUpdated', e) |
| 229 | + this.getClassNameFlag=true; | ||
| 227 | this.mapCtx.getScale({ | 230 | this.mapCtx.getScale({ |
| 228 | success:(res)=>{ | 231 | success:(res)=>{ |
| 229 | this.mapData.scale=res.scale; | 232 | this.mapData.scale=res.scale; |
| @@ -453,6 +456,10 @@ Page({ | @@ -453,6 +456,10 @@ Page({ | ||
| 453 | markerId:this.sellers[i].id | 456 | markerId:this.sellers[i].id |
| 454 | },false) | 457 | },false) |
| 455 | } | 458 | } |
| 456 | - this.getClassNameFlag=true; | 459 | + let that=this; |
| 460 | + setTimeout(function(){ | ||
| 461 | + that.getClassNameFlag=true; | ||
| 462 | + },300) | ||
| 463 | + | ||
| 457 | }, | 464 | }, |
| 458 | }) | 465 | }) |
-
Please register or login to post a comment