|
|
|
|
@ -50,7 +50,7 @@
|
|
|
|
|
<view class="book-box-row-dateitem-status">
|
|
|
|
|
<u-icon name="checkmark" color="#fff" size="20rpx" v-if="item.checked">
|
|
|
|
|
</u-icon>
|
|
|
|
|
<text v-else>{{item.is_open==1?'余票':"售罄"}}</text>
|
|
|
|
|
<text v-else>{{item.is_open==1?'余票':"闭馆"}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view>{{item.week}}</view>
|
|
|
|
|
<view>{{item.datef}}</view>
|
|
|
|
|
@ -198,9 +198,18 @@
|
|
|
|
|
this.showCalendar = false;
|
|
|
|
|
},
|
|
|
|
|
handleSelectDate(e) {
|
|
|
|
|
let that = this;
|
|
|
|
|
|
|
|
|
|
if (e.length != 0) {
|
|
|
|
|
this.load3Day(e[0]);
|
|
|
|
|
this.showCalendar = false;
|
|
|
|
|
var date = e[0]
|
|
|
|
|
|
|
|
|
|
this.load3Day(date, function(isCanbook) {
|
|
|
|
|
if (isCanbook) {
|
|
|
|
|
that.showCalendar = false;
|
|
|
|
|
} else {
|
|
|
|
|
that.util.toast("您选择的日期已经闭馆")
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
openCalendar() {
|
|
|
|
|
@ -219,7 +228,7 @@
|
|
|
|
|
if (m.is_open == 1)
|
|
|
|
|
day.bottomInfo = '余票'
|
|
|
|
|
else {
|
|
|
|
|
day.bottomInfo = '售罄'
|
|
|
|
|
day.bottomInfo = '闭馆'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -363,7 +372,7 @@
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
load3Day(sdate) { //加载7天数据
|
|
|
|
|
load3Day(sdate, callbak) { //加载7天数据
|
|
|
|
|
var that = this;
|
|
|
|
|
that.listDatePrice = [];
|
|
|
|
|
var edate = this.$moment(sdate).add('days', 2).format("yyyy-MM-DD");
|
|
|
|
|
@ -375,6 +384,7 @@
|
|
|
|
|
this.loadCalendar(sdate, edate, function(res) {
|
|
|
|
|
that.listDatePrice = res;
|
|
|
|
|
var i = 0;
|
|
|
|
|
let isOpenDate = false;
|
|
|
|
|
for (var m of that.listDatePrice) {
|
|
|
|
|
m.checked = false;
|
|
|
|
|
m.datef = that.$moment(m.date).format("MM月DD日");
|
|
|
|
|
@ -388,16 +398,16 @@
|
|
|
|
|
} else {
|
|
|
|
|
m.week = week;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m.date == selectDate) {
|
|
|
|
|
if (m.is_open == 1) {
|
|
|
|
|
m.checked = true;
|
|
|
|
|
that.currentDate = m;
|
|
|
|
|
that.currentIndex = i;
|
|
|
|
|
that.loadDefaultTime(m.rules);
|
|
|
|
|
isOpenDate = true;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
isOpenDate = false;
|
|
|
|
|
/* uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: selectDate + "不可以预约",
|
|
|
|
|
complete() {
|
|
|
|
|
@ -406,12 +416,17 @@
|
|
|
|
|
.format("yyyy-MM-DD"))
|
|
|
|
|
}, 2000)
|
|
|
|
|
}
|
|
|
|
|
}, 2000)
|
|
|
|
|
}, 2000) */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
if (callbak)
|
|
|
|
|
callbak(isOpenDate);
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
loadDefaultTime(rules) {
|
|
|
|
|
var that = this;
|
|
|
|
|
|