From 6e95e2530fa0a503e61e65d2056f8e0f6ce48aab Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 29 Jun 2023 21:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package2/pages/appointment/appointment.js | 13 +++++++------ package2/pages/appointment/appointment.ttml | 2 +- pages/order/detail/index.js | 5 +++-- pages/order/detail/index.ttml | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package2/pages/appointment/appointment.js b/package2/pages/appointment/appointment.js index bd13e06..ce851d6 100644 --- a/package2/pages/appointment/appointment.js +++ b/package2/pages/appointment/appointment.js @@ -92,7 +92,8 @@ Page({ const index = e.detail.value this.setData({ currentIndex: index, - merchantId: this.data.mallList[index].id + merchantId: this.data.mallList[index].id, + reservationMerchantName: '' }) console.log(this.data.currentIndex, this.data.merchantId); }, @@ -316,7 +317,7 @@ Page({ data.id = this.data.id } - if (this.data.status == 1) { + if (this.data.status == 1 || this.data.status == '-1') { data.status = 0 } @@ -418,16 +419,16 @@ Page({ that.setData({ pickedAddress: res.data.userAddress || '请选择地址', pickedAddressDetail: res.data.detailedAddress, - pickedDate: util.timestampToTime(res.data.startDate, 'YYYY-MM-DD'), - pickedStartTime: util.timestampToTime(res.data.startDate, 'hh:mm'), - pickedEndTime: util.timestampToTime(res.data.endDate, 'hh:mm'), + pickedDate: util.timestampToTime(res.data.startDate, 'YYYY-MM-DD') || '请选择日期', + pickedStartTime: util.timestampToTime(res.data.startDate, 'hh:mm') || '请选择', + pickedEndTime: util.timestampToTime(res.data.endDate, 'hh:mm') || '请选择', describeStr: res.data.describeStr, status, appointmentText: res.data.status == 1 ? "重新预约" : "修改预约", merchantId: res.data.reservationMerchantId, reservationMerchantName: res.data.reservationMerchantName }) - if (status == 0 || status == 1 || status == 2 || status == 3) { + if (status == 0 || status == 1 || status == 2 || status == 3 || status == '-1') { that.setData({ isShowBtns: true }) diff --git a/package2/pages/appointment/appointment.ttml b/package2/pages/appointment/appointment.ttml index c926bc6..8577fe4 100644 --- a/package2/pages/appointment/appointment.ttml +++ b/package2/pages/appointment/appointment.ttml @@ -65,6 +65,6 @@ - + \ No newline at end of file diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 2bda62f..932a0e7 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -548,8 +548,9 @@ Page({ setTimeout(() => { const isAppointment = that.data.isAppointment + const appointmentStatus = that.data.appointmentStatus const Appointment = tt.getStorageSync('appointment'); - if (Appointment && !isAppointment) { + if (Appointment && (!isAppointment || appointmentStatus == '-1')) { tt.showModal({ title: "提示", content: "是否立即填写预约信息?", @@ -568,7 +569,7 @@ Page({ } }); } - }, 2000); + }, 1000); } that.setData({ diff --git a/pages/order/detail/index.ttml b/pages/order/detail/index.ttml index 50f4cf6..ea4cb2d 100644 --- a/pages/order/detail/index.ttml +++ b/pages/order/detail/index.ttml @@ -121,7 +121,7 @@ 点击预约 {{appointStart}}-{{appointEnd}} + style="color: #d4a971">{{appointStart}}-{{appointEnd}} 预约已取消