diff --git a/src/pages/appointment/CustAppointmentCreate.vue b/src/pages/appointment/CustAppointmentCreate.vue index 4ae7a23..e511a4a 100644 --- a/src/pages/appointment/CustAppointmentCreate.vue +++ b/src/pages/appointment/CustAppointmentCreate.vue @@ -64,7 +64,7 @@ - 预约时间 + 预约时段 @@ -73,14 +73,14 @@ - {{ loadingSlots ? '加载中…' : (appointmentTime || '时间') }} + {{ loadingSlots ? '加载中…' : (selectedSlotRangeLabel || '选择时段') }} @@ -108,7 +108,7 @@ import { import AppIcon from '../../components/AppIcon.vue' import { getUserSession, getStoreSession, setStoreSession } from '../../utils/session.js' import { haversineKm } from '../../utils/geo.js' -import { normalizeToHalfHour, ymdLocal } from '../../utils/halfHourTime.js' +import { normalizeToHalfHour, ymdLocal, formatHalfHourSlotRange } from '../../utils/halfHourTime.js' const userInfo = getUserSession() const storeInfo = getStoreSession() @@ -240,7 +240,7 @@ const creatingAppt = ref(false) const selectedDateStr = ref(ymdLocal()) const availableTimes = ref([]) const loadingSlots = ref(false) -const bookingWindowHint = ref('半小时为一号源,同一时段仅接待一单;已满或已过期不可选') +const bookingWindowHint = ref('请选择半小时时间段;同一时段仅接待一单,已满或已过期不可选') const normalizeText = (s) => (s || '').toString().trim().toLowerCase() @@ -304,6 +304,15 @@ const slotPickerIndex = computed(() => { return i >= 0 ? i : 0 }) +/** 滚轮选项展示为「09:00–09:30」 */ +const availableSlotLabels = computed(() => + availableTimes.value.map((t) => formatHalfHourSlotRange(t)) +) + +const selectedSlotRangeLabel = computed(() => + appointmentTime.value ? formatHalfHourSlotRange(appointmentTime.value) : '' +) + const loadAvailableSlots = async () => { const row = orderedStores.value[selectedStoreIndex.value] const storeId = row?.id @@ -326,7 +335,7 @@ const loadAvailableSlots = async () => { if (ds != null && le != null) { const a = String(ds).slice(0, 5) const b = String(le).slice(0, 5) - bookingWindowHint.value = `本店放号 ${a}~${b},半小时一号源;同一时段仅一单,已满或已过不可选` + bookingWindowHint.value = `本店可约 ${a}~${b};以下为半小时时段,同一时段仅一单,已满或已过不可选` } availableTimes.value = res.data.slots.filter((s) => s.available).map((s) => s.time) if (!availableTimes.value.length) { @@ -537,7 +546,11 @@ onMounted(async () => { } .c-field { margin-bottom: 16px; } .c-time-row { display: flex; gap: 10px; } -.c-time-half { flex: 1; } +.c-time-half { flex: 1; min-width: 0; } +.c-time-half--slot .slot-range-text { + font-size: 12px; + letter-spacing: -0.02em; +} .pet-name-row { display: flex; align-items: center; diff --git a/src/pages/home/Home.vue b/src/pages/home/Home.vue index fd283f3..b9f6a8f 100644 --- a/src/pages/home/Home.vue +++ b/src/pages/home/Home.vue @@ -142,7 +142,7 @@ - 预约时间 + 预约时段 @@ -151,18 +151,18 @@ - {{ staffLoadingSlots ? '加载中…' : (appointmentTime || '时间') }} + {{ staffLoadingSlots ? '加载中…' : (staffSelectedSlotRangeLabel || '选择时段') }} - 半小时一号源,约满不可选 + 每行半小时时段,约满不可选 备注(可选) @@ -199,7 +199,7 @@ import { getUserSession, getStoreSession } from '../../utils/session.js' import { useNavigator } from '../../composables/useNavigator.js' import { formatDateTimeCN } from '../../utils/datetime.js' import { getAppointmentStatusText } from '../../utils/appointment.js' -import { normalizeToHalfHour, ymdLocal } from '../../utils/halfHourTime.js' +import { normalizeToHalfHour, ymdLocal, formatHalfHourSlotRange } from '../../utils/halfHourTime.js' const userInfo = getUserSession() const storeInfo = getStoreSession() @@ -254,6 +254,14 @@ const staffSlotPickerIndex = computed(() => { return i >= 0 ? i : 0 }) +const staffAvailableSlotLabels = computed(() => + staffAvailableTimes.value.map((t) => formatHalfHourSlotRange(t)) +) + +const staffSelectedSlotRangeLabel = computed(() => + appointmentTime.value ? formatHalfHourSlotRange(appointmentTime.value) : '' +) + const filteredOrders = computed(() => orders.value.filter(o => { if (currentStatus.value === 'new') return o.status === 'new' if (currentStatus.value === 'doing') return o.status === 'doing' @@ -540,7 +548,11 @@ onShow(() => { line-height: 1.4; } .c-time-row { display: flex; gap: 10px; } -.c-time-half { flex: 1; } +.c-time-half { flex: 1; min-width: 0; } +.c-time-half--slot .home-slot-range-text { + font-size: 12px; + letter-spacing: -0.02em; +} .home-remark-textarea { min-height: 80px; line-height: 1.5; } /* B端 Tab */ diff --git a/src/pages/mine/Mine.vue b/src/pages/mine/Mine.vue index 43b0797..808ee3c 100644 --- a/src/pages/mine/Mine.vue +++ b/src/pages/mine/Mine.vue @@ -15,7 +15,7 @@ - + 店铺管理 @@ -37,6 +37,18 @@ + + + 门店 + + + + 店铺设置 + + + + + 个人中心 diff --git a/src/pages/mine/Store.vue b/src/pages/mine/Store.vue index 25ff1ee..849773e 100644 --- a/src/pages/mine/Store.vue +++ b/src/pages/mine/Store.vue @@ -1,103 +1,106 @@