完善服务模块缺少付款页的bug

This commit is contained in:
2026-06-02 11:35:31 +08:00
parent c3324d459a
commit 881262940c
35 changed files with 29069 additions and 557 deletions

View File

@@ -1,4 +1,8 @@
import { HomeServiceCatalogType } from '@/types/home-service.uts'
import {
BookingDayOptionType,
BookingTimeSlotType
} from '@/utils/homeServiceBookingTime.uts'
// TODO: 接入真实服务分类、机构与可预约时段接口后替换这些 UI mock。
@@ -37,19 +41,6 @@ export type HomeServiceItemType = {
suitableFor: string
}
export type BookingTimeSlotType = {
id: string
label: string
available: boolean
}
export type BookingDayOptionType = {
id: string
label: string
dateText: string
weekday: string
}
export type HomeServiceAgencyType = {
id: string
name: string
@@ -97,21 +88,6 @@ const FALLBACK_HOME_SERVICE_ITEMS: Array<HomeServiceItemType> = [
{ id: 'svc-ui-004', title: '慢病随访关怀', subtitle: '血压血糖记录 用药核对 健康宣教', category: 'chronic-follow', price: 118, unit: '次', tags: ['可预约', '记录留档', '明码标价'], imageText: '随访', suitableFor: '慢病 长者 家庭' }
]
const BOOKING_DAY_OPTIONS: Array<BookingDayOptionType> = [
{ id: 'day-1', label: '今天', dateText: '05/18', weekday: '周一' },
{ id: 'day-2', label: '明天', dateText: '05/19', weekday: '周二' },
{ id: 'day-3', label: '后天', dateText: '05/20', weekday: '周三' },
{ id: 'day-4', label: '周四', dateText: '05/21', weekday: '周四' }
]
const BOOKING_TIME_SLOTS: Array<BookingTimeSlotType> = [
{ id: 'slot-1', label: '09:00-10:00', available: true },
{ id: 'slot-2', label: '10:00-11:00', available: true },
{ id: 'slot-3', label: '14:00-15:00', available: true },
{ id: 'slot-4', label: '15:00-16:00', available: true },
{ id: 'slot-5', label: '18:00-19:00', available: false }
]
const SERVICE_GUARANTEES: Array<HomeServiceGuaranteeItemType> = [
{ id: 'guarantee-1', label: '平台认证' },
{ id: 'guarantee-2', label: '明码标价' },
@@ -188,14 +164,6 @@ export function getHomeServiceItems(catalog: Array<HomeServiceCatalogType>): Arr
return result
}
export function getBookingDayOptions(): Array<BookingDayOptionType> {
return BOOKING_DAY_OPTIONS.map((item) => ({ ...item }))
}
export function getBookingTimeSlots(): Array<BookingTimeSlotType> {
return BOOKING_TIME_SLOTS.map((item) => ({ ...item }))
}
export function getServiceGuarantees(): Array<HomeServiceGuaranteeItemType> {
return SERVICE_GUARANTEES.map((item) => ({ ...item }))
}