Commit c572efe5d7449cf494b2750bcd1914cac0351deb

Authored by vking
1 parent 013c1675

new 2.0 fix

... ... @@ -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)
... ...
... ... @@ -73,6 +73,14 @@
seller="{{item}}" bindevent="sellerCardEvent" ></seller-card>
</navigator>
</block>
<view style="height: 304rpx;"
class="view flex flex-direction justify-center align-center empty-box empty-box-move margin-sm">
<view class="view flex text-df tips align-center text-orange">
<view class="view icon"></view>
<view class="view">往任意方向拖动地图,可查找不同范围的餐厅</view>
</view>
<view class="view text-lg margin-top-lg">已经滑到底啦</view>
</view>
<view class="view" style="height: 192rpx;"></view>
</scroll-view>
</block>
... ...