From e4a05379ce903cbeb5c148f19e52a38de86f93e9 Mon Sep 17 00:00:00 2001 From: gqt <3217233537@qq.com> Date: Fri, 14 Aug 2026 16:55:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(private-detail):=20=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E6=A1=A3=E4=BD=8D=E6=A0=87=E7=AD=BE=E6=8C=89=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=AE=A1=E7=AE=97(=E4=BF=AE=E5=A4=8D6-12/0-6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=BA0-12=E7=9A=84=E9=97=AE=E9=A2=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/comprehensive/bookings/private-detail.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/miniprogram/src/pages/comprehensive/bookings/private-detail.vue b/miniprogram/src/pages/comprehensive/bookings/private-detail.vue index ed39994..92a3c79 100644 --- a/miniprogram/src/pages/comprehensive/bookings/private-detail.vue +++ b/miniprogram/src/pages/comprehensive/bookings/private-detail.vue @@ -82,7 +82,7 @@ 说明 - {{ formatHoursBefore(rule.hours_before_start) }} + {{ formatHoursBefore(rule.hours_before_start, idx) }} {{ rule.refund_percentage }}% {{ rule.description }} @@ -165,12 +165,12 @@ const confirmCancelBooking = async () => { } } -const formatHoursBefore = (hours) => { +const formatHoursBefore = (hours, idx) => { const h = Number(hours) - if (h >= 24) return '>24小时' - if (h >= 12) return '12-24小时' - if (h >= 0) return '0-12小时' - return `${h}小时` + const rules = refundQuote.value?.rules || [] + if (idx === 0 || h >= 24) return `>${h}小时` + const prev = Number(rules[idx - 1]?.hours_before_start ?? h) + return `${h}-${prev}小时` }