diff --git a/config/config.js b/config/config.js
index 08aa8dc..44164cd 100644
--- a/config/config.js
+++ b/config/config.js
@@ -137,6 +137,10 @@ let config = {
* 预约确认
*/
appointConfirm: "/api/wxCouponOrderReservation/updateStatus",
+ /**
+ * 预约确认
+ */
+ appointSetDate: "/api/wxCouponOrderReservation/update",
/**
* 获得openId
*/
diff --git a/pages/Appointment/appointment.js b/pages/Appointment/appointment.js
index a6247c0..4e4abb2 100644
--- a/pages/Appointment/appointment.js
+++ b/pages/Appointment/appointment.js
@@ -23,7 +23,7 @@ Page({
const that = this
const data = {
pageNum: this.data.pageNum,
- pageSize: 20,
+ pageSize: 200,
}
if (startTime && endTime) {
@@ -31,7 +31,7 @@ Page({
data.serchEndDate = endTime
}
- if (status) {
+ if (status || status === 0) {
data.status = status
}
@@ -44,7 +44,12 @@ Page({
res.data.list.forEach(item => {
const appointStart = util.timestampToTime(item.startDate, 'YYYY-MM-DD hh:mm:ss')
const appointEnd = util.timestampToTime(item.endDate, 'hh:mm:ss')
- item.appointTime = appointStart + ' - ' + appointEnd
+ if (item.startDate && item.endDate) {
+ item.appointTime = appointStart + ' - ' + appointEnd
+ } else {
+ item.appointTime = "暂无";
+ }
+
})
that.setData({
list: res.data.list,
@@ -64,11 +69,21 @@ Page({
},
setType(e) {
- const type = e.currentTarget.dataset.type * 1
+ const type = e.currentTarget.dataset.type
+
this.setData({
currentID: '',
})
- this.getList(type)
+
+ if (type === 'X') {
+ this.getList(false)
+ } else if (type === 'Y') {
+ this.getList(0)
+ } else {
+ this.getList(type * 1)
+ }
+
+
},
setStartTime(e) {
diff --git a/pages/Appointment/appointment.ttml b/pages/Appointment/appointment.ttml
index 683eff5..979bc28 100644
--- a/pages/Appointment/appointment.ttml
+++ b/pages/Appointment/appointment.ttml
@@ -12,8 +12,9 @@
- 全部
- 未确认
+ 全部
+ 待确认
+ 未预约
已确认
已完成
@@ -27,19 +28,20 @@
- 订单编号:{{ item.couponOrderId }}
- 未确认
+ 券码:{{ item.couponOrderId }}
+ 待确认
已取消
已退款
已确认
+ 未预约
已完成
已评价
商品名称:{{ item.couponTitle }}
用户手机号码:{{ item.userPhone }}
- 服务预约时间:
- {{ item.appointTime }}
+ 服务预约时间:暂无
+ {{ item.appointTime }}