Showing
1 changed file
with
31 additions
and
18 deletions
| @@ -15,7 +15,7 @@ const renNum=function(){ | @@ -15,7 +15,7 @@ const renNum=function(){ | ||
| 15 | return arr; | 15 | return arr; |
| 16 | } | 16 | } |
| 17 | const cates_version='?1.1'; | 17 | const cates_version='?1.1'; |
| 18 | -const hasSellerConcat=true;//变量存储所有商户 | 18 | +const hasSellerConcat=false;//变量存储所有商户 |
| 19 | const def_latitude=39.684670; | 19 | const def_latitude=39.684670; |
| 20 | const def_longitude=118.176300; | 20 | const def_longitude=118.176300; |
| 21 | Page({ | 21 | Page({ |
| @@ -205,11 +205,14 @@ Page({ | @@ -205,11 +205,14 @@ Page({ | ||
| 205 | this.user.latitude = res.latitude; | 205 | this.user.latitude = res.latitude; |
| 206 | this.user.longitude = res.longitude; | 206 | this.user.longitude = res.longitude; |
| 207 | map.height = this.systemInfo.windowHeight-this.transverseViewHeight | 207 | map.height = this.systemInfo.windowHeight-this.transverseViewHeight |
| 208 | - this.setData({ | 208 | + let sdobj={ |
| 209 | map: map, | 209 | map: map, |
| 210 | - markers:[], | ||
| 211 | hasSuggestion:false, | 210 | hasSuggestion:false, |
| 212 | - }) | 211 | + } |
| 212 | + if(!this.hasSellerConcat){ | ||
| 213 | + sdobj.markers=[] | ||
| 214 | + } | ||
| 215 | + this.setData(sdobj) | ||
| 213 | if(this.mapCtx){ | 216 | if(this.mapCtx){ |
| 214 | //this.mapCtx.moveToLocation(); | 217 | //this.mapCtx.moveToLocation(); |
| 215 | this.mapCtx.getRegion({ | 218 | this.mapCtx.getRegion({ |
| @@ -527,11 +530,14 @@ Page({ | @@ -527,11 +530,14 @@ Page({ | ||
| 527 | map.longitude = this.user.longitude; | 530 | map.longitude = this.user.longitude; |
| 528 | map.scale=mapScale; | 531 | map.scale=mapScale; |
| 529 | map.height = this.systemInfo.windowHeight-this.transverseViewHeight | 532 | map.height = this.systemInfo.windowHeight-this.transverseViewHeight |
| 530 | - this.setData({ | 533 | + let sdobj={ |
| 531 | map: map, | 534 | map: map, |
| 532 | - markers:[], | ||
| 533 | hasSuggestion:false, | 535 | hasSuggestion:false, |
| 534 | - }) | 536 | + } |
| 537 | + if(!this.hasSellerConcat){ | ||
| 538 | + sdobj.markers=[] | ||
| 539 | + } | ||
| 540 | + this.setData(sdobj) | ||
| 535 | this.mapCtx.moveToLocation({ | 541 | this.mapCtx.moveToLocation({ |
| 536 | success:(res)=>{ | 542 | success:(res)=>{ |
| 537 | console.log('moveToLocation',res) | 543 | console.log('moveToLocation',res) |
| @@ -549,9 +555,11 @@ Page({ | @@ -549,9 +555,11 @@ Page({ | ||
| 549 | if(val[0]>0){ | 555 | if(val[0]>0){ |
| 550 | this.hasSellerConcat=false; | 556 | this.hasSellerConcat=false; |
| 551 | }else{ | 557 | }else{ |
| 552 | - this.setData({ | ||
| 553 | - markers:[], | ||
| 554 | - }) | 558 | + if(!this.hasSellerConcat){ |
| 559 | + this.setData({ | ||
| 560 | + markers:[] | ||
| 561 | + }) | ||
| 562 | + } | ||
| 555 | } | 563 | } |
| 556 | setTimeout(()=>{this.getMarkers();},0) | 564 | setTimeout(()=>{this.getMarkers();},0) |
| 557 | }, | 565 | }, |
| @@ -562,12 +570,15 @@ Page({ | @@ -562,12 +570,15 @@ Page({ | ||
| 562 | map.longitude=suggestion.longitude | 570 | map.longitude=suggestion.longitude |
| 563 | this.sellersIds=[] | 571 | this.sellersIds=[] |
| 564 | this.sellers=[] | 572 | this.sellers=[] |
| 565 | - this.setData({ | ||
| 566 | - markers:[], | ||
| 567 | - suggestion:suggestion, | 573 | + let sdobj={ |
| 574 | + map: map, | ||
| 568 | hasSuggestion:true, | 575 | hasSuggestion:true, |
| 569 | - map:map, | ||
| 570 | - }) | 576 | + suggestion:suggestion, |
| 577 | + } | ||
| 578 | + if(!this.hasSellerConcat){ | ||
| 579 | + sdobj.markers=[] | ||
| 580 | + } | ||
| 581 | + this.setData(sdobj) | ||
| 571 | }, | 582 | }, |
| 572 | 583 | ||
| 573 | getClassNameFlag:true, | 584 | getClassNameFlag:true, |
| @@ -670,9 +681,11 @@ Page({ | @@ -670,9 +681,11 @@ Page({ | ||
| 670 | if(activeNum>0){ | 681 | if(activeNum>0){ |
| 671 | this.hasSellerConcat=false; | 682 | this.hasSellerConcat=false; |
| 672 | }else{ | 683 | }else{ |
| 673 | - this.setData({ | ||
| 674 | - markers:[], | ||
| 675 | - }) | 684 | + if(!this.hasSellerConcat){ |
| 685 | + this.setData({ | ||
| 686 | + markers:[] | ||
| 687 | + }) | ||
| 688 | + } | ||
| 676 | } | 689 | } |
| 677 | setTimeout(()=>{this.getMarkers();},0) | 690 | setTimeout(()=>{this.getMarkers();},0) |
| 678 | 691 |
-
Please register or login to post a comment