|
...
|
...
|
@@ -59,6 +59,14 @@ Page({ |
|
|
|
timePickerMask:false,
|
|
|
|
pnumInputFocus:false,
|
|
|
|
pageMarginBottom:0,
|
|
|
|
speciallist:[
|
|
|
|
{ date: '2018-11-21', background: '', text:'今 天' },
|
|
|
|
{ date: '2018-11-22', background: '', text: '明 天' },
|
|
|
|
{ date: '2018-11-23', background: '', text: '后 天' },
|
|
|
|
],
|
|
|
|
calendar:{
|
|
|
|
nextNum:0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
...
|
...
|
@@ -390,13 +398,14 @@ Page({ |
|
|
|
},
|
|
|
|
dateChange(event){
|
|
|
|
console.log(event);
|
|
|
|
let cktime=util.timetouUnix(event.detail.year+'/'+event.detail.month+'/'+event.detail.day)
|
|
|
|
//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({
|
|
...
|
...
|
@@ -542,5 +551,20 @@ Page({ |
|
|
|
scrollTop: rect.bottom
|
|
|
|
})
|
|
|
|
}).exec()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
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 |
...
|
...
|
|