diff --git a/src/api/home.ts b/src/api/home.ts index 3ba1b0c..67f3de3 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -27,4 +27,4 @@ export function claimIndexCoupon() { export function getWxacode() { return http.Post('/api/wxCode/getWxacode', {}) -} \ No newline at end of file +} diff --git a/src/api/tea-package.ts b/src/api/tea-package.ts new file mode 100644 index 0000000..2591422 --- /dev/null +++ b/src/api/tea-package.ts @@ -0,0 +1,19 @@ +import { http } from '@/http/alova' + +/** + * 获取套餐列表 + */ +export function getTeaPackageList() { + return http.Post('/api/Teamaster/teamasterGroupList', null, + { + meta: { ignoreAuth: true } + } + ) +} + +/** + * 获取茶艺师套餐详情 + */ +export function getTeaPackageDetail(id: number) { + return http.Post('/api/Teamaster/teamasterGroupDetails', { id }) +} \ No newline at end of file diff --git a/src/api/tea-specialist.ts b/src/api/tea-specialist.ts index 39c4f72..e20abba 100644 --- a/src/api/tea-specialist.ts +++ b/src/api/tea-specialist.ts @@ -15,12 +15,12 @@ export interface ITeaSpecialistParams { size: number latitude: number longitude: number - level: string - search: string + level?: string + search?: string } export function getTeaSpecialist(data: ITeaSpecialistParams) { - return http.Post('/api/Teamaster/teamasterList', data) + return http.Post('/api/Teamaster/teamasterList', data) } /** @@ -46,6 +46,13 @@ export function getTeaSpecialistFeeDetails(data) { return http.Post('/api/Teamaster/countTeamPrice', data) } +/** + * 套餐费用明细 + */ +export function getPackageTeaSpecialistFeeDetails(data) { + return http.Post('/api/Teamaster/countGroupTeamPrice', data) +} + /** * 茶叶商品列表 */ @@ -98,3 +105,14 @@ export function createTeaSpecialistRenewOrder(data: ITeaSpecialistRenewOrder) { export function applyTeaSpecialistRefund(id: number, order_type: number = 10) { return http.Post('/api/Teamaster/TeamRefund', {id, order_type}) } + +/** + * 获取专属圈子标签 + */ +export function getExclusiveCirclesLabel() { + return http.Post('/api/Teamaster/teamasterLabel', null, + { + meta: { ignoreAuth: true } + } + ) +} \ No newline at end of file diff --git a/src/api/tea.ts b/src/api/tea.ts index b0f44ff..a9ba285 100644 --- a/src/api/tea.ts +++ b/src/api/tea.ts @@ -59,8 +59,8 @@ export function getNext7Days() { /** * 获取茶叶类型列表 */ -export function getTeaTypeList() { - return http.Post('/api/Teamaster/LeafList') +export function getTeaTypeList(params: { team_user_id: number, type: number }) { + return http.Post('/api/Teamaster/newLeafList', params) } /** diff --git a/src/api/user.ts b/src/api/user.ts index 3840120..21f1e68 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -202,23 +202,8 @@ export function getVerificationCode(data: IGetStoreVerificationCodeParams) { /** * 添加申请茶艺师 */ -export interface IAddTeaSpecialistParams { - license_img: string // 营业执照 - username: string // 茶艺师名字 - gender: number // 茶艺师性别(1男 2女) - both: number | string // 出生年月 - height: string // 身高 - weight: string // 体重 - hobby_introduce: string // 兴趣爱好介绍 - city_id: number // 城市ID - avatar: string // 头像 - certificate: string // 健康证、资格证书信息 - mobile: string // 联系电话 - code: string // 验证码 -} - -export function addTeaSpecialist(data: IAddTeaSpecialistParams) { - return http.Post('/api/submitForm/addTeamaster', data) +export function addTeaSpecialist(data) { + return http.Post('/api/submitForm/addTeamaster', data) } /** diff --git a/src/bundle/coupon/coupon.vue b/src/bundle/coupon/coupon.vue index e75d432..042b463 100644 --- a/src/bundle/coupon/coupon.vue +++ b/src/bundle/coupon/coupon.vue @@ -169,7 +169,7 @@ * @param numbers 预定时长 */ handleInitCoupon: async (price: number) => { - const res = await getCoupons({type_id: 2, price}) // 1茶艺师 2茶室 3 个人中心 + const res = await getCoupons({type_id: 2, price}) // 1茶艺师 2茶室 3 个人中心 4 茶艺师套餐 // couponList.value = res useCoupon.value = res.count.yes_use unUseCoupon.value = res.count.no_use @@ -178,9 +178,6 @@ couponList.value.use = res.result.filter(item => item.is_use == 0) couponList.value.no_use = res.result.filter(item => item.is_use == 1) } - console.log("🚀 ~ couponList.value:", couponList.value) - console.log("🚀 ~ couponList.value:", useCoupon.value) - console.log("🚀 ~ couponList.value:", unUseCoupon.value) }, /** diff --git a/src/bundle/order/tea-specialist/order-detail.vue b/src/bundle/order/tea-specialist/order-detail.vue index fdc8621..e16c076 100644 --- a/src/bundle/order/tea-specialist/order-detail.vue +++ b/src/bundle/order/tea-specialist/order-detail.vue @@ -615,7 +615,10 @@ orderStatus.value = res.order_status // 获取茶叶列表 - const tea = await getTeaTypeList() + const tea = await getTeaTypeList({ + team_user_id: order.value.team_user_id, + type: 1 + }) teaList.value = tea }, diff --git a/src/bundle/package/detail.vue b/src/bundle/package/detail.vue index 8ac9b74..aec8cd9 100644 --- a/src/bundle/package/detail.vue +++ b/src/bundle/package/detail.vue @@ -15,7 +15,7 @@ - @@ -25,16 +25,16 @@ - + - + - 2.9折热销中 + {{ detail.discount }}折热销中 - 已售500+ + 已售{{ detail.sold }}+ @@ -42,12 +42,13 @@ - - 回头客92 + 回头客92 + --> - 500+购买 + {{ detail.sold }}+购买 @@ -86,12 +87,12 @@ 套餐详情 - + 套餐介绍 - + @@ -100,7 +101,7 @@ - 超过一小时100元 + {{ detail.other_description }} @@ -116,36 +117,36 @@ - 个人品鉴,小型聚会 + {{ detail.description }} - + 适用时长 - {{ teaRoomPackage.hour }}小时 + {{ detail.hour }}小时 - + 使用人数 - {{ teaRoomPackage.pl_number }} + {{ detail.pl_number }} - + 退改说明 - + @@ -160,17 +161,21 @@ diff --git a/src/bundle_b/components/TeaSpecialistLevel.vue b/src/bundle_b/components/TeaSpecialistLevel.vue index 06116e6..24ddf8a 100644 --- a/src/bundle_b/components/TeaSpecialistLevel.vue +++ b/src/bundle_b/components/TeaSpecialistLevel.vue @@ -27,24 +27,24 @@ const levelMap = { gold: { icon: `${OSS}icon/icon_gold_medal.png`, - text: '金牌茶艺师' + text: '云华茶艺师' }, senior: { icon: `${OSS}icon/icon_senior_medal.png`, - text: '高级茶艺师' + text: '竹影茶艺师' }, intermediate: { icon: `${OSS}icon/icon_intermediate_medal.png`, - text: '中级茶艺师' + text: '明月茶艺师' }, junior: { icon: `${OSS}icon/icon_junior_medal.png`, - text: '初级茶艺师' + text: '清风茶艺师' }, - enthusiast: { - icon: `${OSS}icon/icon_enthusiast_medal.png`, - text: '茶艺爱好者' - } + // enthusiast: { + // icon: `${OSS}icon/icon_enthusiast_medal.png`, + // text: '茶艺爱好者' + // } } diff --git a/src/bundle_b/pages/tea-specialist/coupon.vue b/src/bundle_b/pages/tea-specialist/coupon.vue index 38c57f6..e183dd0 100644 --- a/src/bundle_b/pages/tea-specialist/coupon.vue +++ b/src/bundle_b/pages/tea-specialist/coupon.vue @@ -73,8 +73,13 @@ // 可用优惠券数量 const useCoupon = ref(0) + + // 优惠券类型 + const typeId = ref(1) // 1茶艺师 2茶室 3个人中心 4套餐优惠券,这个页面是普通的茶艺师列表和茶艺师套餐列表共用的,所以需要区分 onLoad(async (args) => { + typeId.value = args.typeId || 1 + teaRoomId.value = args.id checkedId.value = args.couponId || 0 @@ -87,15 +92,7 @@ * 初始化优惠券列表 */ handleInitCoupon: async (price) => { - // const res = await getTeaSpecialistCoupons() - // const coupon = res.map( item => { - // return { - // ...item, - // user_coupon_id: item.id, - // } - // }) - // couponList.value.use = coupon - const res = await getCoupons({type_id: 1, price}) // 1茶艺师 2茶室 3 个人中心 + const res = await getCoupons({type_id: typeId.value, price}) // 1茶艺师 2茶室 3个人中心 4套餐优惠券 useCoupon.value = res.count.yes_use couponList.value.use = res.result.filter(item => item.is_use == 0) console.log("🚀 ~ couponList.value.use:", couponList.value.use) diff --git a/src/bundle_b/pages/tea-specialist/detail.vue b/src/bundle_b/pages/tea-specialist/detail.vue index d5f007e..602e6f3 100644 --- a/src/bundle_b/pages/tea-specialist/detail.vue +++ b/src/bundle_b/pages/tea-specialist/detail.vue @@ -185,8 +185,8 @@ 专属圈子 - - 123 + + {{ item }} @@ -329,6 +329,7 @@ const info = ref({ price: 0, // 服务费 mileage_price: 0, // 车马费 server_type: 0, // 服务方式 1到店 2上门 3两者都有 + label: [], // 专属圈子标签 }) const latitude = ref(0) // 纬度 const longitude = ref(0) // 经度 diff --git a/src/bundle_b/pages/tea-specialist/list.vue b/src/bundle_b/pages/tea-specialist/list.vue index 3d3a420..b00588d 100644 --- a/src/bundle_b/pages/tea-specialist/list.vue +++ b/src/bundle_b/pages/tea-specialist/list.vue @@ -103,9 +103,11 @@ - - 123 + + {{ labelText }} + diff --git a/src/bundle_b/pages/tea-specialist/reserve.vue b/src/bundle_b/pages/tea-specialist/reserve.vue index 81a2af8..0136fb5 100644 --- a/src/bundle_b/pages/tea-specialist/reserve.vue +++ b/src/bundle_b/pages/tea-specialist/reserve.vue @@ -117,6 +117,7 @@ + 优惠 @@ -231,7 +232,7 @@ - + @@ -405,15 +406,11 @@ diff --git a/src/pages/cashier/cashier.vue b/src/pages/cashier/cashier.vue index e36f639..3ac23d1 100644 --- a/src/pages/cashier/cashier.vue +++ b/src/pages/cashier/cashier.vue @@ -16,6 +16,7 @@ {{ title }} +