|
...
|
...
|
@@ -20,6 +20,10 @@ Page({ |
|
|
|
regions:[],
|
|
|
|
regions_active:'',
|
|
|
|
time:-1,
|
|
|
|
speciallist:[],
|
|
|
|
calendar:{
|
|
|
|
nextNum:0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
regions:[],
|
|
|
|
sellerid:0,
|
|
...
|
...
|
@@ -35,9 +39,15 @@ Page({ |
|
|
|
let d=new Date()/1000;
|
|
|
|
let dateStr=util.unixtoTime(d,'MM-DD DAY');
|
|
|
|
let timePickerArray= await bookOrder.getDayTimeSpace();
|
|
|
|
let speciallist=[
|
|
|
|
{ date: util.unixtoTime(d,'YYYY-MM-DD'), background: '', text:'今 天' },
|
|
|
|
{ date: util.unixtoTime(d+86400,'YYYY-MM-DD'), background: '', text: '明 天' },
|
|
|
|
{ date: util.unixtoTime(d+86400*2,'YYYY-MM-DD'), background: '', text: '后 天' },
|
|
|
|
];
|
|
|
|
this.setData({
|
|
|
|
dateStr:dateStr,
|
|
|
|
timePickerArray:timePickerArray,
|
|
|
|
speciallist:speciallist,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
...
|
...
|
@@ -91,13 +101,13 @@ Page({ |
|
|
|
console.log(this.data.calendarMask)
|
|
|
|
},
|
|
|
|
dateChange(event){
|
|
|
|
let cktime=util.timetouUnix(event.detail.year+'/'+event.detail.month+'/'+event.detail.day)
|
|
|
|
let cktime=util.timetouUnix(event.detail.date)
|
|
|
|
let day0=parseInt(new Date(new Date().setHours(0, 0, 0, 0)) / 1000);
|
|
|
|
if(cktime<day0){
|
|
|
|
util.toast('请选择今天之后的日期','none');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
let clickDay = event.detail.day;
|
|
|
|
let clickDay = event.detail.date.substr(8,2);
|
|
|
|
let changeDay = `dayStyle[1].day`;
|
|
|
|
let changeBg = `dayStyle[1].background`;
|
|
|
|
this.setData({
|
|
...
|
...
|
@@ -208,5 +218,20 @@ Page({ |
|
|
|
this.regions=res.data[0];
|
|
|
|
this.getbooklist();
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
gotoday(e){
|
|
|
|
this.setData({
|
|
|
|
[`calendar.nextNum`]:0
|
|
|
|
})
|
|
|
|
},
|
|
|
|
nextMonth(e){
|
|
|
|
this.setData({
|
|
|
|
[`calendar.nextNum`]:this.data.calendar.nextNum+1
|
|
|
|
})
|
|
|
|
},
|
|
|
|
prevMonth(e){
|
|
|
|
this.setData({
|
|
|
|
[`calendar.nextNum`]:this.data.calendar.nextNum-1
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|