Commit bfc9c4395f0cbbaef739b003d7537f770c4dca32

Authored by wangfan
1 parent c418a1dd

C端优化

Showing 1 changed file with 27 additions and 22 deletions
... ... @@ -365,29 +365,34 @@ Page({
zIndex:sellersLength-si,
zIndexBak:sellersLength-si,
};
if(seller.level.length>0 && seller.level[0].id<3){
//http://qn.colorcun.com/custom/lite-online/cates/%E6%B1%9F%E6%B5%99%E8%8F%9C.png
marker.iconPath="http://qn.colorcun.com/custom/lite-online/cates/其他菜品.png";
if(seller.cate.length>0){
marker.iconPath=seller.cate[0].icon
}
marker.iconPath=marker.iconPath.replace(/\/cates\/(.*)\.png/,function ($0,$1) {
return '/cates/'+encodeURI($1)+'.png'
if(seller.mode.length>0){
seller.mode.forEach(x=>{
if(x.id==1){//大图标
marker.iconPath="http://qn.colorcun.com/custom/lite-online/cates/其他菜品.png";
if(seller.cate.length>0){
marker.iconPath=seller.cate[0].icon
}
marker.iconPath=marker.iconPath.replace(/\/cates\/(.*)\.png/,function ($0,$1) {
return '/cates/'+encodeURI($1)+'.png'
})
marker.width=20;
marker.height=25;
}
if(x.id==2){//商家名
marker.callout={
content: ' ' + seller.sellername + ' ',
color: '#fefefe',
fontSize: 12,
borderWidth: 1,
borderColor: '#4C4C4C',
borderRadius: 50,
bgColor: '#626262',
padding: 5,
textAlign: 'left',
display:'ALWAYS',
};
}
})
marker.width=20;
marker.height=25;
marker.callout={
content: ' ' + seller.sellername + ' ',
color: '#fefefe',
fontSize: 12,
borderWidth: 1,
borderColor: '#4C4C4C',
borderRadius: 50,
bgColor: '#626262',
padding: 5,
textAlign: 'left',
display:'ALWAYS',
};
}
markers.push(marker)
})
... ...