From 28591c62da00e31bbf834156062cdc0066ab28bb Mon Sep 17 00:00:00 2001
From: kaeery <3491123437@qq.com>
Date: Wed, 12 Mar 2025 21:18:59 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=AE=A2=E5=8D=95=E3=80=91=20?=
=?UTF-8?q?=E4=BC=98=E5=8C=96#=20=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/bundle/pages/appoint_time/index.vue | 11 +++++++++++
src/bundle/pages/service_order_detail/index.vue | 3 ++-
src/components/price/index.vue | 17 +++++++++++++++--
src/enums/appEnums.ts | 4 ++++
src/pages/category/components/cate-card.vue | 6 +++++-
src/pages/goods/index.vue | 12 ++++++++++--
src/pages/order/components/order-card.vue | 2 +-
src/pages/order_buy/index.vue | 6 +++++-
src/pages/order_detail/index.vue | 3 ++-
9 files changed, 55 insertions(+), 9 deletions(-)
diff --git a/src/bundle/pages/appoint_time/index.vue b/src/bundle/pages/appoint_time/index.vue
index 9f5041e..79200d9 100644
--- a/src/bundle/pages/appoint_time/index.vue
+++ b/src/bundle/pages/appoint_time/index.vue
@@ -128,12 +128,23 @@ const handleTimeSlot = (timeSlot: TimeSlotObj[]) => {
const time = new Date() // 时间戳转换成标准日期时间
const min = time.getMinutes()
const startTime = time.getHours() + '' + (min <= 9 ? '0' + min : min) // 获取时分并组合成标准格式(时分)比如 10:30 --> 1030
+ // const time = new Date() // 时间戳转换成标准日期时间
+ // const min = time.getMinutes()
+ // const hour = time.getHours()
+ // const currentMinutes = hour * 60 + min
timeSlot.forEach(item => {
const end = item.endTime.replace(':', '')
// 只可预约半小时后的时间段
item.disabled = Number(startTime) + 50 >= Number(end)
// console.log("startTime: " + startTime);
// console.log("end: " + end);
+
+ // const [endHour, endMin] = item.endTime.split(':').map(Number)
+ // // 将结束时间转换为分钟数
+ // const endMinutes = endHour * 60 + endMin
+
+ // // 只可预约半小时后的时间段
+ // item.disabled = currentMinutes + 30 >= endMinutes
})
return timeSlot
}
diff --git a/src/bundle/pages/service_order_detail/index.vue b/src/bundle/pages/service_order_detail/index.vue
index eafb0de..e2e252b 100644
--- a/src/bundle/pages/service_order_detail/index.vue
+++ b/src/bundle/pages/service_order_detail/index.vue
@@ -70,7 +70,8 @@
diff --git a/src/components/price/index.vue b/src/components/price/index.vue
index 33a734f..4892b87 100644
--- a/src/components/price/index.vue
+++ b/src/components/price/index.vue
@@ -1,6 +1,6 @@
- {{ price }}
+ {{ parsePrice }}
{{ desc }}
{{ scribingPrice }}{{ desc }}
@@ -9,6 +9,9 @@