Showing
1 changed file
with
27 additions
and
22 deletions
| @@ -365,29 +365,34 @@ Page({ | @@ -365,29 +365,34 @@ Page({ | ||
| 365 | zIndex:sellersLength-si, | 365 | zIndex:sellersLength-si, |
| 366 | zIndexBak:sellersLength-si, | 366 | zIndexBak:sellersLength-si, |
| 367 | }; | 367 | }; |
| 368 | - if(seller.level.length>0 && seller.level[0].id<3){ | ||
| 369 | - //http://qn.colorcun.com/custom/lite-online/cates/%E6%B1%9F%E6%B5%99%E8%8F%9C.png | ||
| 370 | - marker.iconPath="http://qn.colorcun.com/custom/lite-online/cates/其他菜品.png"; | ||
| 371 | - if(seller.cate.length>0){ | ||
| 372 | - marker.iconPath=seller.cate[0].icon | ||
| 373 | - } | ||
| 374 | - marker.iconPath=marker.iconPath.replace(/\/cates\/(.*)\.png/,function ($0,$1) { | ||
| 375 | - return '/cates/'+encodeURI($1)+'.png' | 368 | + if(seller.mode.length>0){ |
| 369 | + seller.mode.forEach(x=>{ | ||
| 370 | + if(x.id==1){//大图标 | ||
| 371 | + marker.iconPath="http://qn.colorcun.com/custom/lite-online/cates/其他菜品.png"; | ||
| 372 | + if(seller.cate.length>0){ | ||
| 373 | + marker.iconPath=seller.cate[0].icon | ||
| 374 | + } | ||
| 375 | + marker.iconPath=marker.iconPath.replace(/\/cates\/(.*)\.png/,function ($0,$1) { | ||
| 376 | + return '/cates/'+encodeURI($1)+'.png' | ||
| 377 | + }) | ||
| 378 | + marker.width=20; | ||
| 379 | + marker.height=25; | ||
| 380 | + } | ||
| 381 | + if(x.id==2){//商家名 | ||
| 382 | + marker.callout={ | ||
| 383 | + content: ' ' + seller.sellername + ' ', | ||
| 384 | + color: '#fefefe', | ||
| 385 | + fontSize: 12, | ||
| 386 | + borderWidth: 1, | ||
| 387 | + borderColor: '#4C4C4C', | ||
| 388 | + borderRadius: 50, | ||
| 389 | + bgColor: '#626262', | ||
| 390 | + padding: 5, | ||
| 391 | + textAlign: 'left', | ||
| 392 | + display:'ALWAYS', | ||
| 393 | + }; | ||
| 394 | + } | ||
| 376 | }) | 395 | }) |
| 377 | - marker.width=20; | ||
| 378 | - marker.height=25; | ||
| 379 | - marker.callout={ | ||
| 380 | - content: ' ' + seller.sellername + ' ', | ||
| 381 | - color: '#fefefe', | ||
| 382 | - fontSize: 12, | ||
| 383 | - borderWidth: 1, | ||
| 384 | - borderColor: '#4C4C4C', | ||
| 385 | - borderRadius: 50, | ||
| 386 | - bgColor: '#626262', | ||
| 387 | - padding: 5, | ||
| 388 | - textAlign: 'left', | ||
| 389 | - display:'ALWAYS', | ||
| 390 | - }; | ||
| 391 | } | 396 | } |
| 392 | markers.push(marker) | 397 | markers.push(marker) |
| 393 | }) | 398 | }) |
-
Please register or login to post a comment