Commit 162ab881b27a42b9a0d7ff8ce163aab51954cf8f

Authored by vking
2 parents 20574b30 b2a62ab5

Merge remote-tracking branch 'origin/master'

... ... @@ -8,7 +8,7 @@ prev='{{nextNum}}'
next='{{next}}'
speciallist="{{speciallist}}"
closelaststyle="{{closelaststyle}}"
colored="#999999"
colored="#e0e0e0"
circle_show="{{false}}"
weekheight="100"
txt_style="txt_style"
... ...
... ... @@ -15,6 +15,9 @@ Component({
value:util.unixtoTime(new Date()/1000,'YYYY-MM-DD')
}
},
data:{
current:0
},
attached(){
},
... ... @@ -73,7 +76,8 @@ Component({
})
this.setData({
durlist:duritem,
time:durlist.length>0 ? duritem[0].list[0].showdur : ''
time:durlist.length>0 ? duritem[0].list[0].showdur : '',
current:0
})
this.triggerEvent('selecttime',{time:this.data.time,action:'defalut'})
},
... ...
<swiper class="dur-list" display-multiple-items="1">
<swiper class="dur-list" display-multiple-items="1" current="{{current}}">
<block wx:for="{{durlist}}" wx:key="{{index}}" wx:for-item="itemlist">
<swiper-item>
<view class="flex-ll">
... ...
... ... @@ -8,17 +8,17 @@ Component({
}
},
data:{
current:0
},
attached(){
let peoplelist=[]
for(let i=0;i<Math.ceil((30-4)/5);i++){
for(let i=0;i<Math.ceil((30-4)/3);i++){
peoplelist.push({
list:[]
})
}
for(let i=4;i<=30;i++){
let thiscurrent=Math.floor((i-4)/5);
let thiscurrent=Math.floor((i-4)/3);
peoplelist[thiscurrent]['list'].push({
count:i,
isactive:false
... ... @@ -28,7 +28,6 @@ Component({
this.setData({
peoplelist:peoplelist
})
console.log(peoplelist)
},
ready(){
this.editpeoplelist(this.data.count);
... ... @@ -37,6 +36,9 @@ Component({
methods:{
selectpeople(e){
const target=e.currentTarget.dataset;
this.setData({
current:target.idx
})
this.editpeoplelist(target.count);
this.triggerEvent('selectpeople',{people:target.count,action:'click'});
},
... ...
<swiper class="people-list" display-multiple-items="1" next-margin="46rpx">
<block wx:for="{{peoplelist}}" wx:key="{{index}}" wx:for-item="itemlist">
<swiper class="people-list" display-multiple-items="1" next-margin="315rpx" current="{{current}}">
<block wx:for="{{peoplelist}}" wx:key="{{index}}" wx:for-item="itemlist" wx:for-index="indexlist">
<swiper-item>
<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>
<view class="people {{item.isactive ? 'white-font active' : 'black-font'}} font30r font-bold flex-cc" catchtap="selectpeople" data-count="{{item.count}}" data-idx="{{indexlist}}" style="margin-right:15rpx;">{{item.count}} 位</view>
</block>
</view>
</swiper-item>
... ...
... ... @@ -8,7 +8,6 @@
.people{
width:120rpx;
height:100rpx;
margin-left:30rpx;
}
.people.active{
background: -webkit-linear-gradient(top, #F2D190, #C0A369); /* Safari 5.1 - 6.0 */
... ...