Commit ec0783cd6ab614eafd8f17f8c1533e2f84fb767d

Authored by wangfan
1 parent 1cfa133e

c端预定

... ... @@ -32,6 +32,7 @@ Page({
scrollIntoView:'',
suggestion:{},
hasSuggestion:false,
current:0,
},
transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
//qqmapsdk:null,
... ... @@ -267,7 +268,8 @@ Page({
console.log(e)
let markers=this.data.markers;
let bl=1.2;
markers.forEach(m=>{
let current=0;
markers.forEach((m,i)=>{
m.iconPath=m.iconPath.replace('/cates-active/','/cates/')
m.zIndex=m.zIndexBak
if(m.width==20*bl){
... ... @@ -279,6 +281,7 @@ Page({
m.height=7;
}
if(m.id==e.markerId){
current=i;
if(m.width==20){
m.width=20*bl;
m.height=25*bl;
... ... @@ -295,6 +298,7 @@ Page({
};
if(flag){
obj.scrollIntoView='seller-'+e.markerId;
obj.current=current
}
this.setData(obj)
},
... ... @@ -469,6 +473,13 @@ Page({
setTimeout(function(){
that.getClassNameFlag=true;
},300)
},
bindtransition(e){
console.log(e.detail.current);
let i=e.detail.current
this.activeSellerID=this.sellers[i];
this.markertap({
markerId:this.sellers[i].id
},false)
},
})
\ No newline at end of file
... ...
... ... @@ -46,6 +46,7 @@
</picker>
</view>
<view class="transverse-list">
<!--
<scroll-view
scroll-x
class="scroll-view_H"
... ... @@ -60,6 +61,20 @@
</view>
</scroll-view>
-->
<swiper
indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
interval="2000" duration="500"
previous-margin="{{20}}px" next-margin="{{20}}px"
current="{{current}}" bindchange="bindtransition">
<block wx:for="{{sellers}}" wx:key="*this">
<swiper-item>
<view class="seller" id="seller-{{item.id}}">
<sb-tr seller="{{item}}"></sb-tr>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
</view>
... ...
... ... @@ -56,10 +56,8 @@
width: 100%;
}
.transverse-list .seller{
margin: 16rpx 20rpx 0rpx;
box-sizing: content-box;
min-width: 710rpx;
width: 100%;
width: 96%;
margin: 16rpx auto 0;
}
.picker{
... ...