完善茶艺师套餐功能

This commit is contained in:
wangxiaowei
2026-03-28 16:42:40 +08:00
parent 69b0dce2bd
commit 4729dc5ae8
22 changed files with 816 additions and 550 deletions

View File

@ -117,6 +117,7 @@
</view>
</view>
<!-- 优惠 -->
<view class="mt-52rpx">
<view class="flex justify-between items-center text-30rpx text-[#303133] leading-42rpx">
<view>优惠</view>
@ -231,7 +232,7 @@
<!-- 茶艺师信息 -->
<view class="flex items-center bg-white p-20rpx rounded-10rpx mb-20rpx mt-20rpx">
<view class="mr-28rpx relative">
<wd-img width="200rpx" height="200rpx" radius="10rpx" :src="info.image"></wd-img>
<wd-img width="200rpx" height="200rpx" radius="10rpx" :src="info.image" @click="previewImage(info.image, [info.image])"></wd-img>
</view>
<view class="">
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">
@ -405,15 +406,11 @@
<script lang="ts" setup>
import { useMessage, useToast } from 'wot-design-uni'
import { digits } from '@/utils/test'
import { router, toTimes, toPlus, getCurrentDate } from '@/utils/tools'
import { router, toPlus, previewImage } from '@/utils/tools'
import PriceFormat from '@/components/PriceFormat.vue'
import { ReserveServiceCategory, OrderType } from '@/utils/order'
import { getTeaSpecialistDetails, getTeaTypeList, createTeaSpecialistOrder } from '@/api/tea'
import { getNext7Days} from '@/api/tea-room'
import type { ITeaSpecialistDetailsFields, ITeaSpecialistFuture7DaysResult, ITeaTypeListResult } from '@/api/types/tea'
import { TeaSpecialistLevelValue } from '@/utils/teaSpecialist'
import type { IUserAddressListResult } from '@/api/types/user'
import { OrderType } from '@/utils/order'
import { getTeaTypeList, createTeaSpecialistOrder } from '@/api/tea'
import type { ITeaSpecialistFuture7DaysResult, ITeaTypeListResult } from '@/api/types/tea'
import BookingTime from '@/components/BookingTime.vue'
import { CouponType } from '@/utils/coupon'
import { getTeaSpecialistDetail, getTeaSpecialistFeeDetails } from '@/api/tea-specialist'
@ -426,10 +423,6 @@
const isSubmitting = ref(false)
// 服务方式
const serviceType = ref<Array<any>>([
{type: 1, name: '到店服务'},
{type: 2, name: '上门服务'},
])
const serviceTypeValue = ref<number>(1)
// 选择茶馆
@ -597,6 +590,14 @@
}
}
// 初始化时间组件默认值,兼容 H5 端不自动触发 @change 的情况
startTimeValue.value = String(minTimestamp)
// #ifdef H5
// 仅在 H5 环境下手动触发,避免小程序端组件抛出 @change 造成执行两次
Door.handleStartTimePicker({ value: minTimestamp as number })
// #endif
// 初始化数据
Reserve.handleInit()
})
@ -606,7 +607,10 @@
* 初始化-获取茶叶列表
*/
handleInit: async () => {
const tea = await getTeaTypeList()
const tea = await getTeaTypeList({
team_user_id: id.value,
type: 1
})
teaList.value = tea as ITeaTypeListResult[]
},
@ -818,7 +822,7 @@
})
// 获取预定了几个小时
router.navigateTo(`/bundle_b/pages/tea-specialist/coupon?couponId=${selectCouponId.value}&price=${costBill.value.order_amount}`)
router.navigateTo(`/bundle_b/pages/tea-specialist/coupon?couponId=${selectCouponId.value}&price=${costBill.value.order_amount}&typeId=1`)
},
/**