Commit 8b48af05f6249416da7c9c84aea0a9c35b0bff15

Authored by vking
1 parent d7312dc5

lxq 修改ddate

... ... @@ -33,6 +33,13 @@ Component({
action:'defalut',
time:this.data.sectionlist[0].sectiondur.split('-')[0]
}
if(this.data.section){
this.data.sectionlist.forEach((v,i)=>{
if(this.data.section==v.section){
obj.time=v.sectiondur.split('-')[0]
}
})
}
this.triggerEvent('selectsection',obj)
}
}
... ... @@ -115,9 +122,11 @@ Component({
let _target=e.currentTarget.dataset;
this.changesectionstyle(_target.section);
this.tellsection(_target.section,'click',_target.index);
console.log(_target.index);
},
//通知时段
tellsection(selectsection,action,index){
console.log(index);
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
let curtimestamp=new Date()/1000;
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
... ... @@ -149,6 +158,7 @@ Component({
}
if(selectsection==v.section){
curindex=i;
}
})
let curkey='sectionlist['+curindex+'].isselected';
... ...
... ... @@ -96,18 +96,19 @@ Page({
*/
onShow: function () {
this.selectComponent('#getpos').getPos();
if(this.data.reserveDate){//后退进入等情况刷新时段
this.setData({
reserveDate:this.data.reserveDate
})
}
if(this.data.reserveDate){//后退进入等情况刷新时段
this.setData({
reserveDate:this.data.reserveDate
})
}
//已经完成预订的情况---清除日期、时段、选中包间
if(wx.getStorageSync('order')){
this.setData({
seletroomlist:[]
seletroomlist:[],
})
wx.removeStorageSync('order')
}
},
/**
... ...