data: {
vDate: ‘2017-11-11’, //预定日期星期
vIsMoon: false, //中午
vIsNight: false, //晚上
vIsDiscount: false, //折扣
vIsPlayVedio: false, //播放资料
IsList: [‘true’, ‘false’, ‘true’, ‘false’],
},
onLoad: function (options) {
this.setData({
vIsMoon: this.data.IsList[0],
vIsNight: this.data.IsList[1],
vIsDiscount: this.data.IsList[2],
vIsPlayVedio: this.data.IsList[3]
});
},
<checkbox-group bindchange=“checkboxChange”>
<view class=“Oneline”>
<view class=“TwolineItem”><checkbox value=“0” checked="{{vIsMoon}}" bindtap=“IsMoonChecked”/> 中午</view>
<view class=“TwolineItem”><checkbox value=“1” checked="{{vIsNight}}"/> 晚上</view>
</view>
<view class=“Oneline”>
<view class=“TwolineItem”><checkbox value=“2” checked="{{vIsDiscount}}"/> 亲情价</view>
<view class=“TwolineItem”><checkbox value=“3” checked="{{vIsPlayVedio}}"/> 播放资料</view>
</view>
</checkbox-group>
期望这样:
实际: