|
...
|
...
|
@@ -12,6 +12,8 @@ Page({ |
|
|
|
map:{},
|
|
|
|
height:1000,
|
|
|
|
hasLoading:true,
|
|
|
|
activeSellerID:'',//高亮商家
|
|
|
|
scrollSellerID:'',//滚动到商家
|
|
|
|
},
|
|
|
|
user:{},
|
|
|
|
/**
|
|
...
|
...
|
@@ -252,7 +254,7 @@ Page({ |
|
|
|
this.markertap({markerId:this.data.markers[0].id})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
markertap(e){
|
|
|
|
markertap(e,scrollTo=true){
|
|
|
|
if(!e.markerId || e.markerId=='local') return;
|
|
|
|
let markers=this.data.markers
|
|
|
|
this.activeSellerID = e.markerId
|
|
...
|
...
|
@@ -284,6 +286,9 @@ Page({ |
|
|
|
markers: markers,
|
|
|
|
activeSellerID:this.activeSellerID,
|
|
|
|
};
|
|
|
|
if(scrollTo){
|
|
|
|
obj.scrollSellerID=this.activeSellerID
|
|
|
|
}
|
|
|
|
this.setData(obj)
|
|
|
|
},
|
|
|
|
filterGroupData:{},
|
|
...
|
...
|
@@ -297,6 +302,25 @@ Page({ |
|
|
|
this.selectComponent('#as').show(e.detail.seller);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
scrollEvent(e){
|
|
|
|
let idx=0
|
|
|
|
if(e.detail.scrollTop>20){
|
|
|
|
idx=parseInt(e.detail.scrollTop/162)
|
|
|
|
let ms=(e.detail.scrollTop%162)>100?1:0;
|
|
|
|
idx+=ms;
|
|
|
|
}
|
|
|
|
//console.log('scrollEvent',e,e.detail.scrollTop,idx)
|
|
|
|
//console.log('scrollEvent',this.sellers[idx].sellername)
|
|
|
|
this.debounce(()=>{
|
|
|
|
this.scrollEventActive(idx)
|
|
|
|
},300)
|
|
|
|
},
|
|
|
|
scrollEventActive(idx){
|
|
|
|
if(this.sellers[idx]){
|
|
|
|
//this.activeSellerID=this.sellers[idx].id
|
|
|
|
this.markertap({markerId:this.sellers[idx].id},false)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
back:function() {
|
|
|
|
/*
|
|
|
|
var mta = require('mta-wechat-analysis')
|
...
|
...
|
|