Showing
1 changed file
with
10 additions
and
2 deletions
| @@ -144,6 +144,11 @@ Page({ | @@ -144,6 +144,11 @@ Page({ | ||
| 144 | this.mapCtx = wx.createMapContext('map') | 144 | this.mapCtx = wx.createMapContext('map') |
| 145 | } | 145 | } |
| 146 | if(!this.mapCtx) return; | 146 | if(!this.mapCtx) return; |
| 147 | + this.mapCtx.getScale({ | ||
| 148 | + success: (res) => { | ||
| 149 | + this.mapScale = res.scale; | ||
| 150 | + }, | ||
| 151 | + }) | ||
| 147 | this.mapCtx.getRegion({ | 152 | this.mapCtx.getRegion({ |
| 148 | success: (res) => { | 153 | success: (res) => { |
| 149 | if (res.southwest.latitude) { | 154 | if (res.southwest.latitude) { |
| @@ -160,6 +165,7 @@ Page({ | @@ -160,6 +165,7 @@ Page({ | ||
| 160 | console.log('getSellers',this.mapScale,this.mapData) | 165 | console.log('getSellers',this.mapScale,this.mapData) |
| 161 | this.setData({ | 166 | this.setData({ |
| 162 | hasLoading:true, | 167 | hasLoading:true, |
| 168 | + scrollSellerID:'',//清理,滚到顶 | ||
| 163 | }) | 169 | }) |
| 164 | let param = { | 170 | let param = { |
| 165 | lat: this.user.latitude == def_latitude ? '' : this.user.latitude, | 171 | lat: this.user.latitude == def_latitude ? '' : this.user.latitude, |
| @@ -190,6 +196,7 @@ Page({ | @@ -190,6 +196,7 @@ Page({ | ||
| 190 | this.hasFilterData=true | 196 | this.hasFilterData=true |
| 191 | } | 197 | } |
| 192 | this.param = param; | 198 | this.param = param; |
| 199 | + this.activeSellerID=''; | ||
| 193 | App.Customer.SellerList(param).then(async res => { | 200 | App.Customer.SellerList(param).then(async res => { |
| 194 | if (res.ret == 200) { | 201 | if (res.ret == 200) { |
| 195 | this.hasSellers=res.data.flag | 202 | this.hasSellers=res.data.flag |
| @@ -353,7 +360,8 @@ Page({ | @@ -353,7 +360,8 @@ Page({ | ||
| 353 | }, | 360 | }, |
| 354 | scrollTop:0, | 361 | scrollTop:0, |
| 355 | scrollEvent(e){ | 362 | scrollEvent(e){ |
| 356 | - console.log(e.detail.scrollTop) | 363 | + if(this.mapScale<12) return; |
| 364 | + //console.log(e.detail.scrollTop) | ||
| 357 | this.scrollTop=e.detail.scrollTop | 365 | this.scrollTop=e.detail.scrollTop |
| 358 | if(this.hasScrollToIng)return; | 366 | if(this.hasScrollToIng)return; |
| 359 | this.debounce(()=>{ | 367 | this.debounce(()=>{ |
| @@ -366,7 +374,7 @@ Page({ | @@ -366,7 +374,7 @@ Page({ | ||
| 366 | if(po>80){ | 374 | if(po>80){ |
| 367 | idx+=1; | 375 | idx+=1; |
| 368 | } | 376 | } |
| 369 | - console.log(idx,po) | 377 | + //console.log(idx,po) |
| 370 | if(this.sellers[idx]){ | 378 | if(this.sellers[idx]){ |
| 371 | //this.activeSellerID=this.sellers[idx].id | 379 | //this.activeSellerID=this.sellers[idx].id |
| 372 | this.markertap({markerId:this.sellers[idx].id},false) | 380 | this.markertap({markerId:this.sellers[idx].id},false) |
-
Please register or login to post a comment