From 2497204de17c835bbdf8fbf2f270d8cc3472d3b2 Mon Sep 17 00:00:00 2001 From: MaDaLei Date: Fri, 17 Apr 2026 10:57:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E5=8F=8A=E9=97=A8=E5=BA=97=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 7 + .../appointment/CustAppointmentCreate.vue | 119 ++++++++++++---- src/pages/home/Home.vue | 128 ++++++++++++++---- src/pages/mine/Store.vue | 108 ++++++++++++++- 4 files changed, 304 insertions(+), 58 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 7e428b4..bd6ade8 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -69,6 +69,10 @@ export const getAppointmentDetail = (id) => get('/appointment/detail', { id }) // 创建预约 export const createAppointment = (data) => post('/appointment/create', data) +/** 门店某日半小时挂号时段(可约 / 已约满 / 已过) */ +export const getAppointmentAvailableSlots = (storeId, date) => + get('/appointment/available-slots', { storeId, date }) + // 开始服务 export const startAppointment = (appointmentId, staffUserId) => post('/appointment/start', { appointmentId, staffUserId }) @@ -113,6 +117,9 @@ export const updateUser = (data) => put('/user/update', data) // 门店列表(客户预约选店) export const getStoreList = () => get('/store/list', {}) +// 门店详情(含预约放号配置) +export const getStoreDetail = (id) => get('/store/get', { id }) + // 更新店铺 export const updateStore = (data) => put('/store/update', data) diff --git a/src/pages/appointment/CustAppointmentCreate.vue b/src/pages/appointment/CustAppointmentCreate.vue index 78d7788..4ae7a23 100644 --- a/src/pages/appointment/CustAppointmentCreate.vue +++ b/src/pages/appointment/CustAppointmentCreate.vue @@ -66,23 +66,25 @@ 预约时间 - + - {{ appointmentDate || '日期' }} + {{ selectedDateStr || '日期' }} - {{ appointmentTime || '时间' }} + {{ loadingSlots ? '加载中…' : (appointmentTime || '时间') }} + {{ bookingWindowHint }} 备注(可选) @@ -95,16 +97,18 @@ diff --git a/src/pages/home/Home.vue b/src/pages/home/Home.vue index 9e686de..fd283f3 100644 --- a/src/pages/home/Home.vue +++ b/src/pages/home/Home.vue @@ -107,7 +107,7 @@ 暂无数据 - + + @@ -144,23 +144,25 @@ 预约时间 - + - {{ appointmentDate || '日期' }} + {{ staffApptDateStr || '日期' }} - {{ appointmentTime || '时间' }} + {{ staffLoadingSlots ? '加载中…' : (appointmentTime || '时间') }} + 半小时一号源,约满不可选 备注(可选) @@ -184,18 +186,20 @@ @@ -361,4 +440,23 @@ onMounted(() => { font-size: 12px; color: #cbd5e1; } + +.store-picker-like { + display: flex; + align-items: center; + justify-content: space-between; + min-height: 44px; + padding: 0 12px; + border-radius: 12px; + background: #f8fafc; + border: 1px solid #e2e8f0; + font-size: 15px; + color: #111827; +} +.booking-hint { + margin-top: 8px; + font-size: 12px; + color: #94a3b8; + line-height: 1.45; +}