Commit cacaa466108e88f692e85ae108c85463f3561b3d

Authored by liuxuqinfhp1220
1 parent 53c3fade

no message

... ... @@ -61,9 +61,19 @@ Component({
}
}
}
let duritem=[];
for(let i=0;i<Math.ceil((durlist.length)/5);i++){
duritem.push({
list:[]
})
}
durlist.forEach((v,i)=>{
let thiscurrent=Math.floor(i/5);
duritem[thiscurrent].list.push(v)
})
this.setData({
durlist:durlist,
time:durlist.length>0 ? durlist[0].showdur : ''
durlist:duritem,
time:durlist.length>0 ? duritem[0].list[0].showdur : ''
})
this.triggerEvent('selecttime',{time:this.data.time,action:'defalut'})
},
... ...
<swiper class="dur-list" display-multiple-items="5">
<block wx:for="{{durlist}}" wx:key="{{index}}">
<swiper class="dur-list" display-multiple-items="1">
<block wx:for="{{durlist}}" wx:key="{{index}}" wx:for-item="itemlist">
<swiper-item>
<view class="white-font font30r font-bold flex-cc dur-timer" data-time="{{item.showdur}}" catchtap="selecttime">{{item.showdur}}</view>
<view class="flex-ll">
<block wx:for="{{itemlist.list}}" wx:key="{{index}}">
<view class="white-font font30r font-bold flex-cc dur-timer" data-time="{{item.showdur}}" catchtap="selecttime">{{item.showdur}}</view>
</block>
</view>
</swiper-item>
</block>
</swiper>
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
}
.dur-timer{
width:120rpx;
height:100%;
height:100rpx;
background: -webkit-linear-gradient(top, #F2D190, #C0A369); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(-45deg, #F2D190, #C0A369); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(top, #F2D190, #C0A369); /* Firefox 3.6 - 15 */
... ...
... ... @@ -12,11 +12,18 @@ Component({
},
attached(){
let peoplelist=[]
for(let i=4;i<=30;i++){
for(let i=0;i<=Math.ceil((30-4)/5);i++){
peoplelist.push({
list:[]
})
}
for(let i=4;i<=30;i++){
let thiscurrent=Math.floor((i-4)/5);
peoplelist[thiscurrent]['list'].push({
count:i,
isactive:false
})
}
this.setData({
peoplelist:peoplelist
... ... @@ -34,16 +41,19 @@ Component({
},
editpeoplelist(count){
let peoplelist=this.data.peoplelist,setdata={};
peoplelist.forEach((v,i)=>{
if(v.isactive){
v.isactive=false;
let setprevkey='peoplelist['+i+'].isactive';
setdata[setprevkey]=false;
}
if(v.count==count && !v.isactive){
let setcurrentkey='peoplelist['+i+'].isactive';
setdata[setcurrentkey]=true;
}
peoplelist.forEach((r,n)=>{
r.list.forEach((v,i)=>{
if(v.isactive){
v.isactive=false;
let setprevkey='peoplelist['+n+'].list['+i+'].isactive';
setdata[setprevkey]=false;
}
if(v.count==count && !v.isactive){
let setcurrentkey='peoplelist['+n+'].list['+i+'].isactive';
setdata[setcurrentkey]=true;
}
})
})
this.setData(setdata)
}
... ...
<swiper class="people-list" display-multiple-items="5" next-margin="46rpx">
<block wx:for="{{peoplelist}}" wx:key="{{index}}">
<swiper class="people-list" display-multiple-items="1" next-margin="46rpx" circular="{{true}}">
<block wx:for="{{peoplelist}}" wx:key="{{index}}" wx:for-item="itemlist">
<swiper-item>
<view class="people {{item.isactive ? 'white-font active' : 'black-font'}} font30r font-bold flex-cc" catchtap="selectpeople" data-count="{{item.count}}">{{item.count}} 位</view>
<view class="flex-ll">
<block wx:for="{{itemlist.list}}" wx:key="{{index}}">
<view class="people {{item.isactive ? 'white-font active' : 'black-font'}} font30r font-bold flex-cc" catchtap="selectpeople" data-count="{{item.count}}" style="margin-left:{{index==0 ? 0 : 18}}rpx;">{{item.count}} 位</view>
</block>
</view>
</swiper-item>
</block>
</swiper>
\ No newline at end of file
... ...
... ... @@ -7,7 +7,8 @@
}
.people{
width:120rpx;
height:100%;
height:100rpx;
margin-left:30rpx;
}
.people.active{
background: -webkit-linear-gradient(top, #F2D190, #C0A369); /* Safari 5.1 - 6.0 */
... ...
... ... @@ -509,7 +509,7 @@
padding-bottom: 120rpx;
}
.reserve-time{
padding: 82rpx 0 38rpx 30rpx;
padding: 60rpx 0 38rpx 30rpx;
font-size: 32rpx;
}
.hasFullHouse{
... ...