From 62a62932ea71b946a3cd5b027e5da7113c4575fd Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Mon, 27 Apr 2026 10:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8C=B6=E8=89=BA=E5=B8=88=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8A=B6=E6=80=81=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/tea-specialist.ts | 1 + src/api/tea.ts | 2 +- src/bundle/package/tea-specialist.vue | 1 + src/bundle/profile/profile.vue | 2 +- src/bundle_b/pages/tea-specialist/list.vue | 79 +++++++++++++++---- src/bundle_b/pages/tea-specialist/reserve.vue | 29 ++++++- 6 files changed, 93 insertions(+), 21 deletions(-) diff --git a/src/api/tea-specialist.ts b/src/api/tea-specialist.ts index cfd6bd3..1af1e91 100644 --- a/src/api/tea-specialist.ts +++ b/src/api/tea-specialist.ts @@ -18,6 +18,7 @@ export interface ITeaSpecialistParams { level?: string search?: string server_type?: number // 1到店服务 2上门服务 + status?: number // 0可约 1已约 2已取消 } export function getTeaSpecialist(data: ITeaSpecialistParams) { diff --git a/src/api/tea.ts b/src/api/tea.ts index fe29307..dfd5c5a 100644 --- a/src/api/tea.ts +++ b/src/api/tea.ts @@ -103,7 +103,7 @@ export interface ICreateTeaSpecialistOrderParams { is_teacup: number tea_id: string user_coupon_id: number - server_number: number + server_number: string team_group_id?: number } diff --git a/src/bundle/package/tea-specialist.vue b/src/bundle/package/tea-specialist.vue index 7136c55..e2254dc 100644 --- a/src/bundle/package/tea-specialist.vue +++ b/src/bundle/package/tea-specialist.vue @@ -194,6 +194,7 @@ const TeaSpecialist = { longitude: storage.longitude || import.meta.env.VITE_DEFAULT_LONGITUDE, level: uni.getStorageSync('teaPackageType'), server_type: serviceType.value, // 1到店服务 2上门服务 + state: 1, // 1可约 2不可约 } try { const res = await getTeaSpecialist(filter) diff --git a/src/bundle/profile/profile.vue b/src/bundle/profile/profile.vue index 1ce805f..fc98425 100644 --- a/src/bundle/profile/profile.vue +++ b/src/bundle/profile/profile.vue @@ -119,7 +119,7 @@ - 2.14.11 + 2.14.12 diff --git a/src/bundle_b/pages/tea-specialist/list.vue b/src/bundle_b/pages/tea-specialist/list.vue index 0694388..02d0a79 100644 --- a/src/bundle_b/pages/tea-specialist/list.vue +++ b/src/bundle_b/pages/tea-specialist/list.vue @@ -45,13 +45,26 @@ - - - {{ item.label }} + + + + {{ item.label }} + + + + + + + 可约 + + + 不可约 + + @@ -60,7 +73,8 @@ - + 可约 @@ -75,7 +89,8 @@ - {{ item.star }} + {{ item.star }} + @@ -102,10 +117,9 @@ - + {{ label.label_name }} @@ -117,7 +131,8 @@ - + {{ item.company_abv }} @@ -125,7 +140,7 @@ 距您{{ item.distance - }}km + }}km { } }) +// 筛选条件(单选) +const condition = ref('') // 当前选中的筛选条件 +const condition1 = ref(false) +const condition2 = ref(false) + const List = { handleGetLabelStyle: (index: number) => { const firstThreeStyles = [ @@ -218,7 +238,8 @@ const List = { latitude: uni.getStorageSync('latitude') || import.meta.env.VITE_DEFAULT_LATITUDE, longitude: uni.getStorageSync('longitude') || import.meta.env.VITE_DEFAULT_LONGITUDE, search: keywords.value, - server_type: 0 + server_type: 0, + state: condition.value || 0, } getTeaSpecialist(filter).then((res: ITeaSpecialistResult) => { @@ -257,6 +278,28 @@ const List = { List.handleSearch() }, + /** + * 处理单选checkbox点击(模拟单选行为) + */ + handleRadioClick: (type: string, value: number) => { + if (type === 'condition1') { + if (condition1.value) { + condition.value = String(value) + condition2.value = false + } else { + condition.value = '' + } + } else if (type === 'condition2') { + if (condition2.value) { + condition.value = String(value) + condition1.value = false + } else { + condition.value = '' + } + } + List.handleSearch() + }, + /** * 搜索茶艺师列表 */ @@ -331,5 +374,9 @@ page { background: linear-gradient(180deg, #E9FFF1 0%, #F6F7F8 100%) no-repeat; background-size: 100% 220rpx; border-radius: 20rpx 20rpx 0rpx 0rpx; + + :deep(.wd-radio-group) { + background: transparent !important; + } } diff --git a/src/bundle_b/pages/tea-specialist/reserve.vue b/src/bundle_b/pages/tea-specialist/reserve.vue index 0ed8d6a..5a40274 100644 --- a/src/bundle_b/pages/tea-specialist/reserve.vue +++ b/src/bundle_b/pages/tea-specialist/reserve.vue @@ -151,7 +151,7 @@ - + + + 服务人数 + + + 1人~3人 + + + 4人~6人 + + @@ -471,7 +486,7 @@ // 茶艺服务 const showTeaServicePopup = ref(false) // 显示门店列表弹窗 - const servicePeople = ref(1) // 服务人数 + const servicePeople = ref('1-3') // 服务人数 const teaList = ref([]) // 茶叶列表 const selectedTea = ref>([]) // 选择的茶叶 const selectedTeaTxt = ref>([]) // 选择的茶叶文本 @@ -603,6 +618,14 @@ }) const Reserve = { + /** + * 选择服务人数 + * @param type 人数范围 '1-3' 或 '4-6' + */ + servicePeopleChange: (type: string) => { + servicePeople.value = type + }, + /** * 初始化-获取茶叶列表 */ @@ -829,7 +852,7 @@ * 重置差茶艺服务 */ handleResetTeaService: () => { - servicePeople.value = 1 + servicePeople.value = '1-3' selectedTea.value = [] teaUsageValue.value = 0 },