|
...
|
...
|
@@ -223,6 +223,19 @@ Page({ |
|
|
|
zIndexBak: sellersLength - si,
|
|
|
|
//seller: seller,
|
|
|
|
};
|
|
|
|
marker.callout={
|
|
|
|
content: ' ' + seller.sellername + ' ',
|
|
|
|
color: '#353535',
|
|
|
|
fontSize: 12,
|
|
|
|
borderWidth: 1,
|
|
|
|
borderColor: '#cccccc',
|
|
|
|
borderRadius: 50,
|
|
|
|
bgColor: '#fefefe',
|
|
|
|
padding: 5,
|
|
|
|
textAlign: 'left',
|
|
|
|
display:'BYCLICK',
|
|
|
|
};
|
|
|
|
marker.calloutDisplay='BYCLICK';
|
|
|
|
if (seller.mode.length > 0) {
|
|
|
|
seller.mode.forEach(x => {
|
|
|
|
if (x.id == 1) {//大图标
|
|
...
|
...
|
@@ -237,6 +250,10 @@ Page({ |
|
|
|
marker.width = 20;
|
|
|
|
marker.height = 25;
|
|
|
|
}
|
|
|
|
if(x.id==2){//商家名
|
|
|
|
marker.callout.display='ALWAYS';
|
|
|
|
marker.calloutDisplay='ALWAYS';
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
markers.push(marker)
|
|
...
|
...
|
@@ -287,6 +304,12 @@ Page({ |
|
|
|
m.width = 8;
|
|
|
|
m.height = 8;
|
|
|
|
}
|
|
|
|
if(m.callout){
|
|
|
|
m.callout.borderColor= '#cccccc';
|
|
|
|
m.callout.bgColor= '#fefefe';
|
|
|
|
m.callout.color= '#353535';
|
|
|
|
m.callout.display=m.calloutDisplay;
|
|
|
|
}
|
|
|
|
if (m.id == e.markerId) {
|
|
|
|
m.iconPath = m.iconPath.replace('/cates/', '/cates-active/')
|
|
|
|
if (m.width == 20) {
|
|
...
|
...
|
@@ -297,6 +320,12 @@ Page({ |
|
|
|
m.height = 12;
|
|
|
|
}
|
|
|
|
m.zIndex = 9999
|
|
|
|
if(m.callout){
|
|
|
|
m.callout.borderColor= '#F05522';
|
|
|
|
m.callout.bgColor= '#F05522';
|
|
|
|
m.callout.color= '#fefefe';
|
|
|
|
m.callout.display='ALWAYS';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
let obj = {
|
|
...
|
...
|
@@ -324,15 +353,20 @@ Page({ |
|
|
|
},
|
|
|
|
scrollTop:0,
|
|
|
|
scrollEvent(e){
|
|
|
|
if(this.hasScrollToIng)return;
|
|
|
|
//console.log(e.detail.scrollTop)
|
|
|
|
//if(this.hasScrollToIng)return;
|
|
|
|
console.log(e.detail.scrollTop)
|
|
|
|
this.scrollTop=e.detail.scrollTop
|
|
|
|
this.debounce(()=>{
|
|
|
|
this.scrollEventActive()
|
|
|
|
},300)
|
|
|
|
},
|
|
|
|
scrollEventActive(){
|
|
|
|
let idx=parseInt(this.scrollTop/170)
|
|
|
|
let idx=parseInt(this.scrollTop/162)
|
|
|
|
let po=this.scrollTop%((idx>0?idx:1)*162);
|
|
|
|
if(po>80){
|
|
|
|
idx+=1;
|
|
|
|
}
|
|
|
|
console.log(idx,po)
|
|
|
|
if(this.sellers[idx]){
|
|
|
|
//this.activeSellerID=this.sellers[idx].id
|
|
|
|
this.markertap({markerId:this.sellers[idx].id},false)
|
...
|
...
|
|