|
@@ -7,6 +7,7 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
+ isBusyDay: true,
|
|
|
hasAddress: false,
|
|
|
accountNumber: 0,
|
|
|
addressId: '',
|
|
@@ -181,6 +182,7 @@ Page({
|
|
|
disabled: false,
|
|
|
active: false,
|
|
|
status: '',
|
|
|
+ busy: false
|
|
|
})
|
|
|
}
|
|
|
this.setData({
|
|
@@ -196,16 +198,22 @@ Page({
|
|
|
if (!disabled) {
|
|
|
const cDate = e.currentTarget.dataset.date
|
|
|
const index = e.currentTarget.dataset.index
|
|
|
- console.log(cDate, 'cDate');
|
|
|
+ console.log(cDate, 'cDate', new Date(cDate).getDay(), index);
|
|
|
const _year = cDate.split('-')[0]
|
|
|
const _month = cDate.split('-')[1]
|
|
|
const _weeklist = this.data.weekList
|
|
|
- _weeklist[index].active = true
|
|
|
+ //_weeklist[index].active = true
|
|
|
_weeklist.map((item, i) => {
|
|
|
if (index == i ) {
|
|
|
item.active = true
|
|
|
+ if (new Date(cDate).getDay() == 6 || new Date(cDate).getDay() == 0) {
|
|
|
+ item.busy = true
|
|
|
+ } else {
|
|
|
+ item.busy = false
|
|
|
+ }
|
|
|
} else {
|
|
|
item.active = false
|
|
|
+ item.busy = false
|
|
|
}
|
|
|
})
|
|
|
this.setData({
|