Commit a21a073aa660784b35a3537f27561835f50f34eb

Authored by wangfan
1 parent d8a0564a

地图优化

Showing 1 changed file with 11 additions and 4 deletions
@@ -14,7 +14,7 @@ const renNum=function(){ @@ -14,7 +14,7 @@ const renNum=function(){
14 return arr; 14 return arr;
15 } 15 }
16 const cates_version='?1.1'; 16 const cates_version='?1.1';
17 -const hasSellerConcat=false;//变量存储所有商户 17 +const hasSellerConcat=true;//变量存储所有商户
18 Page({ 18 Page({
19 19
20 /** 20 /**
@@ -37,6 +37,7 @@ Page({ @@ -37,6 +37,7 @@ Page({
37 hasSuggestion:false, 37 hasSuggestion:false,
38 current:0, 38 current:0,
39 }, 39 },
  40 + hasSellerConcat:hasSellerConcat,
40 transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20 41 transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
41 //qqmapsdk:null, 42 //qqmapsdk:null,
42 sellers: [], 43 sellers: [],
@@ -385,7 +386,7 @@ Page({ @@ -385,7 +386,7 @@ Page({
385 }else{ 386 }else{
386 seller.distance+='米'; 387 seller.distance+='米';
387 } 388 }
388 - if(hasSellerConcat){ 389 + if(this.hasSellerConcat){
389 this.sellersIds.push(seller.id); 390 this.sellersIds.push(seller.id);
390 } 391 }
391 hasMark=true; 392 hasMark=true;
@@ -441,7 +442,7 @@ Page({ @@ -441,7 +442,7 @@ Page({
441 } 442 }
442 this.sellersNow=now_sid; 443 this.sellersNow=now_sid;
443 let obj={} 444 let obj={}
444 - if(hasSellerConcat){ 445 + if(this.hasSellerConcat){
445 obj.markers=this.data.markers.concat(markers); 446 obj.markers=this.data.markers.concat(markers);
446 }else{ 447 }else{
447 obj.markers=markers; 448 obj.markers=markers;
@@ -484,9 +485,15 @@ Page({ @@ -484,9 +485,15 @@ Page({
484 }, 485 },
485 bindMultiPickerChange(e){ 486 bindMultiPickerChange(e){
486 console.log(e); 487 console.log(e);
  488 + let val=util.val(e);
487 this.setData({ 489 this.setData({
488 - multiIndex:util.val(e) 490 + multiIndex:val
489 }) 491 })
  492 + this.hasSellerConcat=hasSellerConcat;
  493 + if(val[0]>0 || val[1]>0){
  494 + this.hasSellerConcat=false;
  495 + this.sellersIds=[];
  496 + }
490 this.getMarkers(); 497 this.getMarkers();
491 }, 498 },
492 setSuggestion(suggestion){ 499 setSuggestion(suggestion){