Commit c572efe5d7449cf494b2750bcd1914cac0351deb

Authored by vking
1 parent 013c1675

new 2.0 fix

@@ -223,6 +223,19 @@ Page({ @@ -223,6 +223,19 @@ Page({
223 zIndexBak: sellersLength - si, 223 zIndexBak: sellersLength - si,
224 //seller: seller, 224 //seller: seller,
225 }; 225 };
  226 + marker.callout={
  227 + content: ' ' + seller.sellername + ' ',
  228 + color: '#353535',
  229 + fontSize: 12,
  230 + borderWidth: 1,
  231 + borderColor: '#cccccc',
  232 + borderRadius: 50,
  233 + bgColor: '#fefefe',
  234 + padding: 5,
  235 + textAlign: 'left',
  236 + display:'BYCLICK',
  237 + };
  238 + marker.calloutDisplay='BYCLICK';
226 if (seller.mode.length > 0) { 239 if (seller.mode.length > 0) {
227 seller.mode.forEach(x => { 240 seller.mode.forEach(x => {
228 if (x.id == 1) {//大图标 241 if (x.id == 1) {//大图标
@@ -237,6 +250,10 @@ Page({ @@ -237,6 +250,10 @@ Page({
237 marker.width = 20; 250 marker.width = 20;
238 marker.height = 25; 251 marker.height = 25;
239 } 252 }
  253 + if(x.id==2){//商家名
  254 + marker.callout.display='ALWAYS';
  255 + marker.calloutDisplay='ALWAYS';
  256 + }
240 }) 257 })
241 } 258 }
242 markers.push(marker) 259 markers.push(marker)
@@ -287,6 +304,12 @@ Page({ @@ -287,6 +304,12 @@ Page({
287 m.width = 8; 304 m.width = 8;
288 m.height = 8; 305 m.height = 8;
289 } 306 }
  307 + if(m.callout){
  308 + m.callout.borderColor= '#cccccc';
  309 + m.callout.bgColor= '#fefefe';
  310 + m.callout.color= '#353535';
  311 + m.callout.display=m.calloutDisplay;
  312 + }
290 if (m.id == e.markerId) { 313 if (m.id == e.markerId) {
291 m.iconPath = m.iconPath.replace('/cates/', '/cates-active/') 314 m.iconPath = m.iconPath.replace('/cates/', '/cates-active/')
292 if (m.width == 20) { 315 if (m.width == 20) {
@@ -297,6 +320,12 @@ Page({ @@ -297,6 +320,12 @@ Page({
297 m.height = 12; 320 m.height = 12;
298 } 321 }
299 m.zIndex = 9999 322 m.zIndex = 9999
  323 + if(m.callout){
  324 + m.callout.borderColor= '#F05522';
  325 + m.callout.bgColor= '#F05522';
  326 + m.callout.color= '#fefefe';
  327 + m.callout.display='ALWAYS';
  328 + }
300 } 329 }
301 }) 330 })
302 let obj = { 331 let obj = {
@@ -324,15 +353,20 @@ Page({ @@ -324,15 +353,20 @@ Page({
324 }, 353 },
325 scrollTop:0, 354 scrollTop:0,
326 scrollEvent(e){ 355 scrollEvent(e){
327 - if(this.hasScrollToIng)return;  
328 - //console.log(e.detail.scrollTop) 356 + //if(this.hasScrollToIng)return;
  357 + console.log(e.detail.scrollTop)
329 this.scrollTop=e.detail.scrollTop 358 this.scrollTop=e.detail.scrollTop
330 this.debounce(()=>{ 359 this.debounce(()=>{
331 this.scrollEventActive() 360 this.scrollEventActive()
332 },300) 361 },300)
333 }, 362 },
334 scrollEventActive(){ 363 scrollEventActive(){
335 - let idx=parseInt(this.scrollTop/170) 364 + let idx=parseInt(this.scrollTop/162)
  365 + let po=this.scrollTop%((idx>0?idx:1)*162);
  366 + if(po>80){
  367 + idx+=1;
  368 + }
  369 + console.log(idx,po)
336 if(this.sellers[idx]){ 370 if(this.sellers[idx]){
337 //this.activeSellerID=this.sellers[idx].id 371 //this.activeSellerID=this.sellers[idx].id
338 this.markertap({markerId:this.sellers[idx].id},false) 372 this.markertap({markerId:this.sellers[idx].id},false)
@@ -73,6 +73,14 @@ @@ -73,6 +73,14 @@
73 seller="{{item}}" bindevent="sellerCardEvent" ></seller-card> 73 seller="{{item}}" bindevent="sellerCardEvent" ></seller-card>
74 </navigator> 74 </navigator>
75 </block> 75 </block>
  76 + <view style="height: 304rpx;"
  77 + class="view flex flex-direction justify-center align-center empty-box empty-box-move margin-sm">
  78 + <view class="view flex text-df tips align-center text-orange">
  79 + <view class="view icon"></view>
  80 + <view class="view">往任意方向拖动地图,可查找不同范围的餐厅</view>
  81 + </view>
  82 + <view class="view text-lg margin-top-lg">已经滑到底啦</view>
  83 + </view>
76 <view class="view" style="height: 192rpx;"></view> 84 <view class="view" style="height: 192rpx;"></view>
77 </scroll-view> 85 </scroll-view>
78 </block> 86 </block>