|
...
|
...
|
@@ -246,7 +246,7 @@ Page({ |
|
|
|
},
|
|
|
|
})
|
|
|
|
},
|
|
|
|
markertap(e){
|
|
|
|
markertap(e,flag=true){
|
|
|
|
console.log(e)
|
|
|
|
let markers=this.data.markers;
|
|
|
|
let bl=1.2;
|
|
...
|
...
|
@@ -269,10 +269,13 @@ Page({ |
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.setData({
|
|
|
|
scrollIntoView:'seller-'+e.markerId,
|
|
|
|
let obj={
|
|
|
|
markers:markers,
|
|
|
|
})
|
|
|
|
};
|
|
|
|
if(flag){
|
|
|
|
obj.scrollIntoView='seller-'+e.markerId;
|
|
|
|
}
|
|
|
|
this.setData(obj)
|
|
|
|
},
|
|
|
|
async getMarkers(){
|
|
|
|
let cmap=this.data.map;
|
|
...
|
...
|
@@ -414,4 +417,21 @@ Page({ |
|
|
|
map:map,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
getClassNameFlag:true,
|
|
|
|
activeSellerID:'',
|
|
|
|
bindscroll(e){
|
|
|
|
if(!this.getClassNameFlag) return;
|
|
|
|
this.getClassNameFlag=false;
|
|
|
|
let w=e.detail.scrollWidth/this.sellers.length;
|
|
|
|
let i=Math.round(e.detail.scrollLeft/w);
|
|
|
|
console.log(e.detail,this.sellers,i);
|
|
|
|
if(this.activeSellerID!=this.sellers[i].id){
|
|
|
|
this.activeSellerID=this.sellers[i];
|
|
|
|
this.markertap({
|
|
|
|
markerId:this.sellers[i].id
|
|
|
|
},false)
|
|
|
|
}
|
|
|
|
this.getClassNameFlag=true;
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|