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}小时`
}