|
@@ -50,7 +50,8 @@ Page({
|
|
|
let edd = new Date(now.setDate(now.getDate() + 7));
|
|
|
let ed = util.formatTime(edd).substring(0, 10).replace(/\//g, '-')
|
|
|
const date = new Date()
|
|
|
- this.setData({ beginDate: date.getFullYear()+"-01"+"-01", endDate: ed, list: [] });
|
|
|
+ let m = date.getMonth() + 1;
|
|
|
+ this.setData({ beginDate: date.getFullYear()+"-"+ (m>9 ? '' +m : '0'+m) +"-01", endDate: ed, list: [] });
|
|
|
this.queryList();
|
|
|
},
|
|
|
|
|
@@ -124,8 +125,6 @@ Page({
|
|
|
},
|
|
|
canCancel(item) { // 判断是否能取消, 未到预约时间前都能取消,至少提前1个小时
|
|
|
let t = item.visitDate + ' ' + item.beginTime + ':00';
|
|
|
-
|
|
|
-
|
|
|
let vdt = new Date(t.replace(/-/g,'/'));
|
|
|
let tdt = new Date().getTime();
|
|
|
if (vdt < tdt) {
|
|
@@ -133,7 +132,7 @@ Page({
|
|
|
}
|
|
|
// const dayTime = 86400000;
|
|
|
const dayTime = 3600000;
|
|
|
- return (vdt - tdt) >= dayTime
|
|
|
+ return item.attend == 0 && (vdt - tdt) >= dayTime
|
|
|
},
|
|
|
doCancel: function (e) {
|
|
|
let id = e.currentTarget.dataset.id
|