Commit 151e13b12b8eb0c18a5a7531ba3814c70bd0eb0f

Authored by wangfan
1 parent a21a073a

地图优化

@@ -36,6 +36,7 @@ Page({ @@ -36,6 +36,7 @@ Page({
36 suggestion:{}, 36 suggestion:{},
37 hasSuggestion:false, 37 hasSuggestion:false,
38 current:0, 38 current:0,
  39 + hasSellers:false,
39 }, 40 },
40 hasSellerConcat:hasSellerConcat, 41 hasSellerConcat:hasSellerConcat,
41 transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20 42 transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
@@ -441,7 +442,9 @@ Page({ @@ -441,7 +442,9 @@ Page({
441 console.log('接口报错了'); 442 console.log('接口报错了');
442 } 443 }
443 this.sellersNow=now_sid; 444 this.sellersNow=now_sid;
444 - let obj={} 445 + let obj={
  446 + hasSellers:now_sid.length>0
  447 + }
445 if(this.hasSellerConcat){ 448 if(this.hasSellerConcat){
446 obj.markers=this.data.markers.concat(markers); 449 obj.markers=this.data.markers.concat(markers);
447 }else{ 450 }else{
@@ -501,7 +504,10 @@ Page({ @@ -501,7 +504,10 @@ Page({
501 //let pos=DA.gcj02towgs84(suggestion.longitude,suggestion.latitude) 504 //let pos=DA.gcj02towgs84(suggestion.longitude,suggestion.latitude)
502 map.latitude=suggestion.latitude 505 map.latitude=suggestion.latitude
503 map.longitude=suggestion.longitude 506 map.longitude=suggestion.longitude
  507 + this.sellersIds=[]
  508 + this.sellers=[]
504 this.setData({ 509 this.setData({
  510 + markers:[],
505 suggestion:suggestion, 511 suggestion:suggestion,
506 hasSuggestion:true, 512 hasSuggestion:true,
507 map:map, 513 map:map,
@@ -49,8 +49,8 @@ @@ -49,8 +49,8 @@
49 indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}" 49 indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
50 interval="2000" duration="500" 50 interval="2000" duration="500"
51 previous-margin="{{20}}px" next-margin="{{20}}px" 51 previous-margin="{{20}}px" next-margin="{{20}}px"
52 - current="{{current}}" bindchange="bindtransition">  
53 - <block wx:for="{{markers}}" wx:key="markers.key"> 52 + current="{{current}}" bindchange="bindtransition" hidden="{{!hasSellers}}">
  53 + <block wx:for="{{markers}}" wx:key="markers.key" >
54 <swiper-item bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.display!='none'}}"> 54 <swiper-item bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.display!='none'}}">
55 <view class="seller" id="seller-{{item.id}}"> 55 <view class="seller" id="seller-{{item.id}}">
56 <sb-tr seller="{{item.seller}}" hasActivity="{{true}}"></sb-tr> 56 <sb-tr seller="{{item.seller}}" hasActivity="{{true}}"></sb-tr>