完善茶艺师套餐功能
This commit is contained in:
@ -27,4 +27,4 @@ export function claimIndexCoupon() {
|
|||||||
|
|
||||||
export function getWxacode() {
|
export function getWxacode() {
|
||||||
return http.Post('/api/wxCode/getWxacode', {})
|
return http.Post('/api/wxCode/getWxacode', {})
|
||||||
}
|
}
|
||||||
|
|||||||
19
src/api/tea-package.ts
Normal file
19
src/api/tea-package.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { http } from '@/http/alova'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取套餐列表
|
||||||
|
*/
|
||||||
|
export function getTeaPackageList() {
|
||||||
|
return http.Post<any>('/api/Teamaster/teamasterGroupList', null,
|
||||||
|
{
|
||||||
|
meta: { ignoreAuth: true }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取茶艺师套餐详情
|
||||||
|
*/
|
||||||
|
export function getTeaPackageDetail(id: number) {
|
||||||
|
return http.Post<any>('/api/Teamaster/teamasterGroupDetails', { id })
|
||||||
|
}
|
||||||
@ -15,12 +15,12 @@ export interface ITeaSpecialistParams {
|
|||||||
size: number
|
size: number
|
||||||
latitude: number
|
latitude: number
|
||||||
longitude: number
|
longitude: number
|
||||||
level: string
|
level?: string
|
||||||
search: string
|
search?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTeaSpecialist(data: ITeaSpecialistParams) {
|
export function getTeaSpecialist(data: ITeaSpecialistParams) {
|
||||||
return http.Post('/api/Teamaster/teamasterList', data)
|
return http.Post<any>('/api/Teamaster/teamasterList', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,6 +46,13 @@ export function getTeaSpecialistFeeDetails(data) {
|
|||||||
return http.Post<any>('/api/Teamaster/countTeamPrice', data)
|
return http.Post<any>('/api/Teamaster/countTeamPrice', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 套餐费用明细
|
||||||
|
*/
|
||||||
|
export function getPackageTeaSpecialistFeeDetails(data) {
|
||||||
|
return http.Post<any>('/api/Teamaster/countGroupTeamPrice', data)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 茶叶商品列表
|
* 茶叶商品列表
|
||||||
*/
|
*/
|
||||||
@ -98,3 +105,14 @@ export function createTeaSpecialistRenewOrder(data: ITeaSpecialistRenewOrder) {
|
|||||||
export function applyTeaSpecialistRefund(id: number, order_type: number = 10) {
|
export function applyTeaSpecialistRefund(id: number, order_type: number = 10) {
|
||||||
return http.Post('/api/Teamaster/TeamRefund', {id, order_type})
|
return http.Post('/api/Teamaster/TeamRefund', {id, order_type})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专属圈子标签
|
||||||
|
*/
|
||||||
|
export function getExclusiveCirclesLabel() {
|
||||||
|
return http.Post<any>('/api/Teamaster/teamasterLabel', null,
|
||||||
|
{
|
||||||
|
meta: { ignoreAuth: true }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -59,8 +59,8 @@ export function getNext7Days() {
|
|||||||
/**
|
/**
|
||||||
* 获取茶叶类型列表
|
* 获取茶叶类型列表
|
||||||
*/
|
*/
|
||||||
export function getTeaTypeList() {
|
export function getTeaTypeList(params: { team_user_id: number, type: number }) {
|
||||||
return http.Post<any>('/api/Teamaster/LeafList')
|
return http.Post<any>('/api/Teamaster/newLeafList', params)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -202,23 +202,8 @@ export function getVerificationCode(data: IGetStoreVerificationCodeParams) {
|
|||||||
/**
|
/**
|
||||||
* 添加申请茶艺师
|
* 添加申请茶艺师
|
||||||
*/
|
*/
|
||||||
export interface IAddTeaSpecialistParams {
|
export function addTeaSpecialist(data) {
|
||||||
license_img: string // 营业执照
|
return http.Post<any>('/api/submitForm/addTeamaster', data)
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -169,7 +169,7 @@
|
|||||||
* @param numbers 预定时长
|
* @param numbers 预定时长
|
||||||
*/
|
*/
|
||||||
handleInitCoupon: async (price: number) => {
|
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
|
// couponList.value = res
|
||||||
useCoupon.value = res.count.yes_use
|
useCoupon.value = res.count.yes_use
|
||||||
unUseCoupon.value = res.count.no_use
|
unUseCoupon.value = res.count.no_use
|
||||||
@ -178,9 +178,6 @@
|
|||||||
couponList.value.use = res.result.filter(item => item.is_use == 0)
|
couponList.value.use = res.result.filter(item => item.is_use == 0)
|
||||||
couponList.value.no_use = res.result.filter(item => item.is_use == 1)
|
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)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -615,7 +615,10 @@
|
|||||||
orderStatus.value = res.order_status
|
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
|
teaList.value = tea
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<view>
|
<view>
|
||||||
<view class="mt-20rpx mx-30rpx swiper">
|
<view class="mt-20rpx mx-30rpx swiper">
|
||||||
<wd-swiper value-key="image" height="320rpx" :indicator="{ type: 'dots-bar' }" :list="swiperList"
|
<wd-swiper value-key="image" height="320rpx" :indicator="{ type: 'dots-bar' }" :list="detail.img_arr"
|
||||||
v-model:current="current" mode="aspectFit" @click="Detail.handlePreviewImage">
|
v-model:current="current" mode="aspectFit" @click="Detail.handlePreviewImage">
|
||||||
</wd-swiper>
|
</wd-swiper>
|
||||||
</view>
|
</view>
|
||||||
@ -25,16 +25,16 @@
|
|||||||
<view class="flex items-center justify-between">
|
<view class="flex items-center justify-between">
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view>
|
<view>
|
||||||
<price-format color="#FF5951" :first-size="44" :second-size="44" :subscript-size="28" :price="298"></price-format>
|
<price-format color="#FF5951" :first-size="44" :second-size="44" :subscript-size="28" :price="detail.discount_price"></price-format>
|
||||||
</view>
|
</view>
|
||||||
<view class="ml-20rpx">
|
<view class="ml-20rpx">
|
||||||
<price-format color="#909399" :first-size="24" :second-size="24" :subscript-size="24" :price="298" :line-through="true"></price-format>
|
<price-format color="#909399" :first-size="24" :second-size="24" :subscript-size="24" :price="detail.price" :line-through="true"></price-format>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="bg-[#FFEDED] text-[#FF5951] text-24rpx px-20rpx py-6rpx rounded-8rpx ml-28rpx flex items-center">
|
class="bg-[#FFEDED] text-[#FF5951] text-24rpx px-20rpx py-6rpx rounded-8rpx ml-28rpx flex items-center">
|
||||||
2.9折热销中</view>
|
{{ detail.discount }}折热销中</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-[#909399] text-24rpx">已售500+</view>
|
<view class="text-[#909399] text-24rpx">已售{{ detail.sold }}+</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
@ -42,12 +42,13 @@
|
|||||||
|
|
||||||
<!-- 标签 -->
|
<!-- 标签 -->
|
||||||
<view class="flex items-center mt-20rpx">
|
<view class="flex items-center mt-20rpx">
|
||||||
<view
|
<!-- <view
|
||||||
class="text-[#C08A45] text-22rpx border-2rpx border-solid border-[#C3801C] rounded-8rpx px-12rpx py-6rpx mr-16rpx font-500">
|
class="text-[#C08A45] text-22rpx border-2rpx border-solid border-[#C3801C] rounded-8rpx px-12rpx py-6rpx mr-16rpx font-500">
|
||||||
回头客92</view>
|
回头客92
|
||||||
|
</view> -->
|
||||||
<view
|
<view
|
||||||
class="text-[#C08A45] text-22rpx border-2rpx border-solid border-[#C3801C] rounded-8rpx px-12rpx py-6rpx font-500">
|
class="text-[#C08A45] text-22rpx border-2rpx border-solid border-[#C3801C] rounded-8rpx px-12rpx py-6rpx font-500">
|
||||||
500+购买</view>
|
{{ detail.sold }}+购买</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 保障框 -->
|
<!-- 保障框 -->
|
||||||
@ -86,12 +87,12 @@
|
|||||||
<!-- 套餐详情 -->
|
<!-- 套餐详情 -->
|
||||||
<view class="bg-white rounded-16rpx py-26rpx px-30rpx mt-24rpx mx-30rpx">
|
<view class="bg-white rounded-16rpx py-26rpx px-30rpx mt-24rpx mx-30rpx">
|
||||||
<view class="text-[#303133] text-32rpx leading-44rpx font-bold mb-24rpx">套餐详情</view>
|
<view class="text-[#303133] text-32rpx leading-44rpx font-bold mb-24rpx">套餐详情</view>
|
||||||
<view class="mt-24rpx" v-if="teaRoomPackage.introduce">
|
<view class="mt-24rpx">
|
||||||
<view class="flex items-center mb-20rpx">
|
<view class="flex items-center mb-20rpx">
|
||||||
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_tcsm.png`"></wd-img>
|
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_tcsm.png`"></wd-img>
|
||||||
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">套餐介绍</view>
|
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">套餐介绍</view>
|
||||||
</view>
|
</view>
|
||||||
<rich-text :nodes="teaRoomPackage.introduce"></rich-text>
|
<rich-text :nodes="detail.introduce_details"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-30rpx">
|
<view class="mt-30rpx">
|
||||||
<view class="flex items-center mb-20rpx">
|
<view class="flex items-center mb-20rpx">
|
||||||
@ -100,7 +101,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="bg-[#6A6363] w-8rpx h-8rpx rounded-full mr-12rpx"></view>
|
<view class="bg-[#6A6363] w-8rpx h-8rpx rounded-full mr-12rpx"></view>
|
||||||
<view class="font-500 text-26rpx text-[#303133]">超过一小时100元</view>
|
<view class="font-500 text-26rpx text-[#303133]">{{ detail.other_description }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -116,36 +117,36 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="bg-[#6A6363] w-8rpx h-8rpx rounded-full mr-12rpx"></view>
|
<view class="bg-[#6A6363] w-8rpx h-8rpx rounded-full mr-12rpx"></view>
|
||||||
<view class="font-500 text-26rpx text-[#303133]">个人品鉴,小型聚会</view>
|
<view class="font-500 text-26rpx text-[#303133]">{{ detail.description }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-30rpx" v-if="teaRoomPackage.hour">
|
<view class="mt-30rpx">
|
||||||
<view class="flex items-center mb-20rpx">
|
<view class="flex items-center mb-20rpx">
|
||||||
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_sysc.png`"></wd-img>
|
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_sysc.png`"></wd-img>
|
||||||
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">适用时长</view>
|
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">适用时长</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">{{ teaRoomPackage.hour }}小时</view>
|
<view class="">{{ detail.hour }}小时</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-30rpx" v-if="teaRoomPackage.pl_number">
|
<view class="mt-30rpx">
|
||||||
<view class="flex items-center mb-20rpx">
|
<view class="flex items-center mb-20rpx">
|
||||||
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_syrs.png`"></wd-img>
|
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_syrs.png`"></wd-img>
|
||||||
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">使用人数</view>
|
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">使用人数</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">{{ teaRoomPackage.pl_number }}</view>
|
<view class="">{{ detail.pl_number }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-20rpx mb-24rpx">
|
<view class="mt-20rpx mb-24rpx">
|
||||||
<wd-gap height="2rpx" bgColor="#F6F7F9"></wd-gap>
|
<wd-gap height="2rpx" bgColor="#F6F7F9"></wd-gap>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-30rpx" v-if="teaRoomPackage.returd_details">
|
<view class="mt-30rpx">
|
||||||
<view class="flex items-center mb-20rpx">
|
<view class="flex items-center mb-20rpx">
|
||||||
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_tgsm.png`"></wd-img>
|
<wd-img width="36rpx" height="36rpx" :src="`${OSS}icon/icon_tgsm.png`"></wd-img>
|
||||||
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">退改说明</view>
|
<view class="font-bold text-28rpx leading-48rpx text-[#303133] ml-6rpx">退改说明</view>
|
||||||
</view>
|
</view>
|
||||||
<rich-text :nodes="teaRoomPackage.returd_details"></rich-text>
|
<rich-text :nodes="detail.returd_details"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -160,17 +161,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { toast } from '@/utils/toast'
|
import { useToast } from 'wot-design-uni'
|
||||||
import { router, previewImage, replaceNewLine } from '@/utils/tools'
|
import { router, previewImage } from '@/utils/tools'
|
||||||
|
|
||||||
import PriceFormat from '@/components/PriceFormat.vue'
|
import PriceFormat from '@/components/PriceFormat.vue'
|
||||||
|
import { getTeaPackageDetail } from '@/api/tea-package'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
|
|
||||||
|
|
||||||
const swiperList = ref<string[]>([])
|
const swiperList = ref<string[]>([])
|
||||||
const current = ref<number>(0)
|
const current = ref<number>(0)
|
||||||
|
const toast = useToast()
|
||||||
|
|
||||||
|
// 套餐ID
|
||||||
|
const teaPackageId = ref<number>(0)
|
||||||
|
// 套餐详情
|
||||||
|
const detail = ref<any>({})
|
||||||
|
|
||||||
const teaRoomPackage = reactive({
|
const teaRoomPackage = reactive({
|
||||||
introduce: '',
|
introduce: '',
|
||||||
@ -179,7 +184,17 @@ const teaRoomPackage = reactive({
|
|||||||
returd_details: ''
|
returd_details: ''
|
||||||
})
|
})
|
||||||
onLoad((args) => {
|
onLoad((args) => {
|
||||||
Detail.handleInit(args)
|
if (!args.id) {
|
||||||
|
toast.show('缺少套餐ID')
|
||||||
|
router.navigateBack()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置套餐ID
|
||||||
|
uni.setStorageSync('teaPackageId', args.id)
|
||||||
|
console.log('teaPackageId', uni.getStorageSync('teaPackageId'))
|
||||||
|
teaPackageId.value = args.id
|
||||||
|
Detail.handleInit()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -188,12 +203,12 @@ const Detail = {
|
|||||||
/**
|
/**
|
||||||
* 初始包间详情
|
* 初始包间详情
|
||||||
*/
|
*/
|
||||||
handleInit: async (args) => {
|
handleInit: async () => {
|
||||||
// 包间详情
|
// 包间详情
|
||||||
|
const res = await getTeaPackageDetail(teaPackageId.value)
|
||||||
|
detail.value = res[0]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交订单
|
* 提交订单
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -69,12 +69,12 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="flex justify-between items-center text-30rpx text-[#303133] leading-42rpx">
|
<view class="flex justify-between items-center text-30rpx text-[#303133] leading-42rpx">
|
||||||
<view>套餐</view>
|
<view>套餐</view>
|
||||||
<view>¥{{ costBill.server_all_price }}</view>
|
<view>¥{{ costBill.server_price }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="flex justify-between items-center text-24rpx text-[#909399] leading-34rpx mt-16rpx">
|
class="flex justify-between items-center text-24rpx text-[#909399] leading-34rpx mt-16rpx">
|
||||||
<view>服务费(含两小时)</view>
|
<view>服务费(含{{ teaPackage.hour }}小时)</view>
|
||||||
<view>x1</view>
|
<view>x1</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -133,6 +133,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 优惠 -->
|
||||||
|
<view class="mt-52rpx">
|
||||||
|
<view class="flex justify-between items-center text-30rpx text-[#303133] leading-42rpx">
|
||||||
|
<view>优惠</view>
|
||||||
|
<view class="text-[#4C9F44]">-¥{{ costBill.coupon_price }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-between items-center text-24rpx text-[#909399] leading-34rpx mt-16rpx">
|
||||||
|
<view>优惠券</view>
|
||||||
|
<view>-¥{{ costBill.coupon_price }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="my-30rpx">
|
<view class="my-30rpx">
|
||||||
<wd-gap height="2rpx" bgColor='#F6F7F9'></wd-gap>
|
<wd-gap height="2rpx" bgColor='#F6F7F9'></wd-gap>
|
||||||
</view>
|
</view>
|
||||||
@ -244,7 +256,7 @@
|
|||||||
<!-- 茶艺师信息 -->
|
<!-- 茶艺师信息 -->
|
||||||
<view class="flex items-center bg-white p-20rpx rounded-10rpx mb-20rpx mt-20rpx">
|
<view class="flex items-center bg-white p-20rpx rounded-10rpx mb-20rpx mt-20rpx">
|
||||||
<view class="mr-28rpx relative">
|
<view class="mr-28rpx relative">
|
||||||
<wd-img width="200rpx" height="200rpx" :src="info.image" radius="10rpx"></wd-img>
|
<wd-img width="200rpx" height="200rpx" :src="info.image" radius="10rpx" @click="previewImage(info.image, [info.image])"></wd-img>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">
|
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">
|
||||||
@ -292,9 +304,11 @@
|
|||||||
<view class="font-400 text-28rpx text-[#303133] line-1">{{ address.name }}</view>
|
<view class="font-400 text-28rpx text-[#303133] line-1">{{ address.name }}</view>
|
||||||
<view class="flex items-start mt-10rpx">
|
<view class="flex items-start mt-10rpx">
|
||||||
<view class="w-28rpx h-28rpx flex items-center mr-8rpx mt-8rpx">
|
<view class="w-28rpx h-28rpx flex items-center mr-8rpx mt-8rpx">
|
||||||
<wd-img :src="`${OSS}icon/icon_location4.png`" width="28rpx" height="28rpx"></wd-img>
|
<wd-img :src="`${OSS}icon/icon_location4.png`" width="28rpx"
|
||||||
|
height="28rpx"></wd-img>
|
||||||
|
</view>
|
||||||
|
<view class="font-400 text-28rpx text-[#303133] line-1 w-400rpx">{{ address.address }}
|
||||||
</view>
|
</view>
|
||||||
<view class="font-400 text-28rpx text-[#303133] line-1 w-400rpx">{{ address.address }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -354,6 +368,27 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 优惠券 -->
|
||||||
|
<view class="bg-white py-26rpx px-30rpx mt-20rpx" @click="Reserve.handleToCoupon(CouponType.Discount)">
|
||||||
|
<view class="text-[#303133] text-32rpx leading-44rpx font-bold mb-24rpx">优惠券</view>
|
||||||
|
<view class="flex items-center justify-between">
|
||||||
|
<view class="text-[26rpx] text-[#606266] leading-36rpx">优惠券</view>
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="text-[28rpx] text-[#909399] leading-40rpx w-430rpx line-1 text-right">
|
||||||
|
<template v-if="selectedCoupon?.id > 0">
|
||||||
|
{{ selectedCoupon.name }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
请选择
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 订单备注 -->
|
<!-- 订单备注 -->
|
||||||
<view class="bg-white py-26rpx px-30rpx mt-20rpx">
|
<view class="bg-white py-26rpx px-30rpx mt-20rpx">
|
||||||
<view class="text-32rpx leading-44rpx text-#303133 mb-28rpx">
|
<view class="text-32rpx leading-44rpx text-#303133 mb-28rpx">
|
||||||
@ -392,13 +427,15 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useMessage, useToast } from 'wot-design-uni'
|
import { useMessage, useToast } from 'wot-design-uni'
|
||||||
import { router, toPlus } from '@/utils/tools'
|
import { router, toPlus, previewImage } from '@/utils/tools'
|
||||||
import PriceFormat from '@/components/PriceFormat.vue'
|
import PriceFormat from '@/components/PriceFormat.vue'
|
||||||
import { OrderType } from '@/utils/order'
|
import { OrderType } from '@/utils/order'
|
||||||
import { getTeaTypeList, createTeaSpecialistOrder } from '@/api/tea'
|
import { getTeaTypeList, createTeaSpecialistOrder } from '@/api/tea'
|
||||||
import type { ITeaSpecialistFuture7DaysResult, ITeaTypeListResult } from '@/api/types/tea'
|
import type { ITeaSpecialistFuture7DaysResult, ITeaTypeListResult } from '@/api/types/tea'
|
||||||
import BookingTime from '@/components/BookingTime.vue'
|
import BookingTime from '@/components/BookingTime.vue'
|
||||||
import { getTeaSpecialistDetail, getTeaSpecialistFeeDetails } from '@/api/tea-specialist'
|
import { getTeaSpecialistDetail, getPackageTeaSpecialistFeeDetails } from '@/api/tea-specialist'
|
||||||
|
import { getTeaPackageDetail } from '@/api/tea-package'
|
||||||
|
import { CouponType } from '@/utils/coupon'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
@ -506,6 +543,10 @@ const info = ref({
|
|||||||
server_type: 0, // 服务类型 1到店 2上门 3两者皆有
|
server_type: 0, // 服务类型 1到店 2上门 3两者皆有
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 选择的优惠券
|
||||||
|
const selectedCoupon = ref<{id: number, name: string}>({id: 0, name: ''})
|
||||||
|
const selectCouponId = ref<number>(0)
|
||||||
|
|
||||||
// 计算费用明细 service(服务费) travel(车马费) teaServiceFee(茶艺服务) coupon(优惠券)
|
// 计算费用明细 service(服务费) travel(车马费) teaServiceFee(茶艺服务) coupon(优惠券)
|
||||||
const bill = ref<{ service: any, travel: any, teaService: any, coupon: number, total: number }>({
|
const bill = ref<{ service: any, travel: any, teaService: any, coupon: number, total: number }>({
|
||||||
service: {
|
service: {
|
||||||
@ -555,9 +596,25 @@ const costParams = ref({
|
|||||||
user_coupon_id: 0, // 优惠券id
|
user_coupon_id: 0, // 优惠券id
|
||||||
is_teacup: 0, // 是否需要茶具 0客户自备 1茶艺师提供
|
is_teacup: 0, // 是否需要茶具 0客户自备 1茶艺师提供
|
||||||
team_user_id: 0, // 茶艺师id
|
team_user_id: 0, // 茶艺师id
|
||||||
|
team_group_id: 0, // 茶艺师套餐ID
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 选择的套餐
|
||||||
|
const teaPackage = ref<any>({})
|
||||||
|
const teaPackageId = ref<number>(0)
|
||||||
|
|
||||||
onLoad(async (args) => {
|
onLoad(async (args) => {
|
||||||
|
teaPackageId.value = Number(uni.getStorageSync('teaPackageId'))
|
||||||
|
|
||||||
|
if (teaPackageId.value === 0) {
|
||||||
|
toast.show('请选择套餐')
|
||||||
|
router.navigateBack(1, 500)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置套餐ID
|
||||||
|
costParams.value.team_group_id = Number(teaPackageId.value)
|
||||||
|
|
||||||
if (args.id) {
|
if (args.id) {
|
||||||
id.value = Number(args.id)
|
id.value = Number(args.id)
|
||||||
costParams.value.team_user_id = Number(args.id)
|
costParams.value.team_user_id = Number(args.id)
|
||||||
@ -595,7 +652,10 @@ const Reserve = {
|
|||||||
* 初始化-获取茶叶列表
|
* 初始化-获取茶叶列表
|
||||||
*/
|
*/
|
||||||
handleInit: async () => {
|
handleInit: async () => {
|
||||||
const tea = await getTeaTypeList()
|
const tea = await getTeaTypeList({
|
||||||
|
team_user_id: id.value,
|
||||||
|
type: 1
|
||||||
|
})
|
||||||
teaList.value = tea as ITeaTypeListResult[]
|
teaList.value = tea as ITeaTypeListResult[]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -604,10 +664,19 @@ const Reserve = {
|
|||||||
*/
|
*/
|
||||||
handleSetServiceType: async () => {
|
handleSetServiceType: async () => {
|
||||||
// 设置默认服务方式
|
// 设置默认服务方式
|
||||||
const serviceStorage = uni.getStorageSync('selectedPackageService')
|
const storage = uni.getStorageSync('selectedPackageService')
|
||||||
if (serviceStorage) {
|
if (storage) {
|
||||||
const serviceData = serviceStorage
|
const serviceData = storage
|
||||||
serviceTypeValue.value = serviceData.serviceType
|
serviceTypeValue.value = serviceData.serviceType
|
||||||
|
|
||||||
|
// 到店服务
|
||||||
|
if (serviceTypeValue.value == 1) {
|
||||||
|
teaHouse.value = {
|
||||||
|
id: serviceData.id,
|
||||||
|
name: serviceData.name,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 如果是到店服务则默认选择门店,如果是上门服务则默认选择地址
|
// 如果是到店服务则默认选择门店,如果是上门服务则默认选择地址
|
||||||
address.value = {
|
address.value = {
|
||||||
id: serviceData.id,
|
id: serviceData.id,
|
||||||
@ -627,6 +696,11 @@ const Reserve = {
|
|||||||
router.navigateBack(1, 500)
|
router.navigateBack(1, 500)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const res = await getTeaPackageDetail(teaPackageId.value)
|
||||||
|
teaPackage.value = res[0]
|
||||||
|
sevenDay.minimum_time = Number(teaPackage.value.hour)
|
||||||
|
// costBill.value.package = package.price
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -759,6 +833,40 @@ const Reserve = {
|
|||||||
Reserve.handleCost()
|
Reserve.handleCost()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转优惠券页面
|
||||||
|
*/
|
||||||
|
handleToCoupon(type) {
|
||||||
|
if (totalHour.value == 0) {
|
||||||
|
toast.info('请选择预定时间')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.$off('chooseCoupon');
|
||||||
|
uni.$on('chooseCoupon', params => {
|
||||||
|
console.log("🚀 ~ params:", params)
|
||||||
|
uni.$off('chooseCoupon')
|
||||||
|
if (params.coupon) {
|
||||||
|
selectedCoupon.value = { id: params.coupon.id, name: params.coupon.name }
|
||||||
|
bill.value.coupon = params.coupon.coupon_price
|
||||||
|
selectCouponId.value = params.coupon.id // 这里的ID是在数据表自增的ID,保存下来是为了回显列表的,没有其他作用
|
||||||
|
costParams.value.user_coupon_id = params.coupon.id
|
||||||
|
} else {
|
||||||
|
selectedCoupon.value = { id: 0, name: '' }
|
||||||
|
bill.value.coupon = 0
|
||||||
|
selectCouponId.value = 0
|
||||||
|
costParams.value.user_coupon_id = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算费用明细
|
||||||
|
Reserve.handleCost()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取预定了几个小时
|
||||||
|
router.navigateTo(`/bundle_b/pages/tea-specialist/coupon?couponId=${selectCouponId.value}&price=${costBill.value.order_amount}&typeId=4`)
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置差茶艺服务
|
* 重置差茶艺服务
|
||||||
*/
|
*/
|
||||||
@ -809,6 +917,16 @@ const Reserve = {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (totalHour.value < sevenDay.minimum_time) {
|
||||||
|
toast.info(`起订时间${sevenDay.minimum_time}小时`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (totalHour.value > sevenDay.minimum_time) {
|
||||||
|
toast.info(`结束时间不能超过${sevenDay.minimum_time}小时`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 选择了上门服务则必须要茶艺师提供茶具
|
// 选择了上门服务则必须要茶艺师提供茶具
|
||||||
if (serviceTypeValue.value === 2 && teaUsageValue.value === 0) {
|
if (serviceTypeValue.value === 2 && teaUsageValue.value === 0) {
|
||||||
teaUsageValue.value = 1
|
teaUsageValue.value = 1
|
||||||
@ -841,7 +959,7 @@ const Reserve = {
|
|||||||
remrk: orderRemarks.value, // 订单备注
|
remrk: orderRemarks.value, // 订单备注
|
||||||
is_teacup: teaUsageValue.value, // 是否需要茶具 0客户自备 1茶艺师提供
|
is_teacup: teaUsageValue.value, // 是否需要茶具 0客户自备 1茶艺师提供
|
||||||
tea_id: selectedTea.value.join(','), // 茶叶商品ids 多个逗号隔开
|
tea_id: selectedTea.value.join(','), // 茶叶商品ids 多个逗号隔开
|
||||||
user_coupon_id: 0, // 优惠券id默认传0
|
user_coupon_id: selectedCoupon.value.id, // 优惠券id默认传0
|
||||||
server_number: servicePeople.value
|
server_number: servicePeople.value
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -868,7 +986,7 @@ const Reserve = {
|
|||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
router.navigateTo(`/pages/cashier/cashier?from=${OrderType.TeaSpecialist}&orderId=${res.order_id}&teaSpecialistName=${info.value.name}&teaSpecialistOrderAmount=${res.order_amount}`)
|
router.navigateTo(`/pages/cashier/cashier?from=${OrderType.TeaSpecialist}&orderId=${res.order_id}&teaSpecialistName=${info.value.name}&teaSpecialistOrderAmount=${res.order_amount}&teaPackageTitle=${teaPackage.value.title}`)
|
||||||
}, 800)
|
}, 800)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.close()
|
toast.close()
|
||||||
@ -881,8 +999,11 @@ const Reserve = {
|
|||||||
* 计算费用明细
|
* 计算费用明细
|
||||||
*/
|
*/
|
||||||
handleCost: async () => {
|
handleCost: async () => {
|
||||||
|
console.log("🚀 ~ costParams.value:", costParams.value)
|
||||||
|
|
||||||
toast.loading('计费中...')
|
toast.loading('计费中...')
|
||||||
const res = await getTeaSpecialistFeeDetails(costParams.value)
|
costParams
|
||||||
|
const res = await getPackageTeaSpecialistFeeDetails(costParams.value)
|
||||||
toast.close()
|
toast.close()
|
||||||
costBill.value = res
|
costBill.value = res
|
||||||
}
|
}
|
||||||
@ -898,8 +1019,10 @@ const Door = {
|
|||||||
console.log("🚀 ~ e:", e)
|
console.log("🚀 ~ e:", e)
|
||||||
Door.startTimeTimestamp = e.value
|
Door.startTimeTimestamp = e.value
|
||||||
startTimeLayout.value = Door.handleFormatDate(e.value)
|
startTimeLayout.value = Door.handleFormatDate(e.value)
|
||||||
endTimeLayout.value = Door.handleFormatDate(Number(e.value) + Number(2 * 60 * 60 * 1000)) // 初始化结束时间是未来2个小时
|
// 动态最小预定时间
|
||||||
Door.endTimeTimestamp = Number(e.value) + Number(2 * 60 * 60 * 1000) // 初始化结束时间是未来2个小时
|
const minHour = sevenDay.minimum_time || 2
|
||||||
|
endTimeLayout.value = Door.handleFormatDate(Number(e.value) + Number(minHour * 60 * 60 * 1000))
|
||||||
|
Door.endTimeTimestamp = Number(e.value) + Number(minHour * 60 * 60 * 1000)
|
||||||
endTimeValue.value = String(Door.endTimeTimestamp)
|
endTimeValue.value = String(Door.endTimeTimestamp)
|
||||||
Door.handleTotalTimestamp()
|
Door.handleTotalTimestamp()
|
||||||
|
|
||||||
@ -909,7 +1032,13 @@ const Door = {
|
|||||||
|
|
||||||
handleEndTimePicker: (e: { value: number }) => {
|
handleEndTimePicker: (e: { value: number }) => {
|
||||||
Door.endTimeTimestamp = e.value
|
Door.endTimeTimestamp = e.value
|
||||||
endTimeLayout.value = Door.handleFormatDate(e.value)
|
// 保证选择的时长不能小于最小预定时间
|
||||||
|
const minHour = sevenDay.minimum_time || 2
|
||||||
|
if (Door.endTimeTimestamp - Door.startTimeTimestamp < minHour * 60 * 60 * 1000) {
|
||||||
|
Door.endTimeTimestamp = Door.startTimeTimestamp + minHour * 60 * 60 * 1000
|
||||||
|
endTimeValue.value = String(Door.endTimeTimestamp)
|
||||||
|
}
|
||||||
|
endTimeLayout.value = Door.handleFormatDate(Door.endTimeTimestamp)
|
||||||
Door.handleTotalTimestamp()
|
Door.handleTotalTimestamp()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -984,6 +1113,11 @@ const Door = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (totalHour.value > sevenDay.minimum_time) {
|
||||||
|
toast.info(`结束时间不能超过${sevenDay.minimum_time}小时`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// if (!digits(totalHour.value)) {
|
// if (!digits(totalHour.value)) {
|
||||||
// message.alert({
|
// message.alert({
|
||||||
// title: '提示',
|
// title: '提示',
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<view class="w-216rpx mb-30rpx relative" v-for="(item, index) in list" :key="index"
|
<view class="w-216rpx mb-30rpx relative" v-for="(item, index) in list" :key="index"
|
||||||
@click="TeaSpecialist.handleSelect(index)">
|
@click="TeaSpecialist.handleSelect(index)">
|
||||||
<view class="relative w-216rpx h-216rpx rounded-16rpx overflow-hidden">
|
<view class="relative w-216rpx h-216rpx rounded-16rpx overflow-hidden">
|
||||||
<wd-img :src="item.avatar" width="216rpx" height="216rpx" mode="aspectFill"></wd-img>
|
<wd-img :src="item.image" width="216rpx" height="216rpx" mode="aspectFill"></wd-img>
|
||||||
<view class="absolute bottom-0 left-0 z-10">
|
<view class="absolute bottom-0 left-0 z-10">
|
||||||
<!-- 选中的样式 -->
|
<!-- 选中的样式 -->
|
||||||
<view
|
<view
|
||||||
@ -34,7 +34,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-28rpx text-[#2A3B56] mt-12rpx line-1">{{ item.name }}</view>
|
<view class="text-28rpx text-[#2A3B56] mt-12rpx line-1">{{ item.name }}</view>
|
||||||
<view class="text-24rpx text-[#F55B02] mt-6rpx">{{ item.level }}</view>
|
<view class="text-24rpx text-[#F55B02] mt-6rpx">
|
||||||
|
<tea-specialist-level :level="item.level"></tea-specialist-level>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -50,23 +52,25 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 茶艺师详细信息模块 -->
|
<!-- 茶艺师详细信息模块 -->
|
||||||
<view class="mx-28rpx mt-20rpx mb-30rpx relative border-2rpx border-solid border-[#F6F4F4]" v-if="selectedSpecialist">
|
<view class="mx-28rpx mt-20rpx mb-30rpx relative border-2rpx border-solid border-[#F6F4F4]" v-if="info">
|
||||||
<view class="flex justify-between items-start bg-[#F5F7FF] rounded-t-16rpx p-30rpx">
|
<view class="flex justify-between items-start bg-[#F5F7FF] rounded-t-16rpx p-30rpx">
|
||||||
<view>
|
<view>
|
||||||
<view class="text-36rpx font-bold text-[#303133] mb-12rpx">{{ selectedSpecialist.name }}</view>
|
<view class="text-36rpx font-bold text-[#303133] mb-12rpx">{{ info.name }}</view>
|
||||||
<view class="text-28rpx text-[#120D26] mb-12rpx">{{ selectedSpecialist.title }}</view>
|
<view class="text-28rpx text-[#120D26] mb-12rpx">
|
||||||
|
<tea-specialist-level :level="info.level"></tea-specialist-level>
|
||||||
|
</view>
|
||||||
<view class="flex items-center text-24rpx text-[#909399] mb-16rpx">
|
<view class="flex items-center text-24rpx text-[#909399] mb-16rpx">
|
||||||
<wd-img :src="`${OSS}icon/icon_store_cert.png`" width="36rpx" height="36rpx"
|
<wd-img :src="`${OSS}icon/icon_store_cert.png`" width="36rpx" height="36rpx"
|
||||||
class="mr-8rpx"></wd-img>
|
class="mr-8rpx"></wd-img>
|
||||||
<text>商家认证的名称</text>
|
<text>商家认证</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<wd-rate v-model="selectedSpecialist.rating" readonly active-color="#FF5951" allow-half
|
<wd-rate v-model="info.sold" readonly active-color="#FF5951" allow-half
|
||||||
active-icon="star-filled" icon="star" space="4rpx" />
|
active-icon="star-filled" icon="star" space="4rpx" />
|
||||||
<text class="text-24rpx text-[#606266] ml-10rpx">{{ selectedSpecialist.rating }} 推荐</text>
|
<text class="text-24rpx text-[#606266] ml-10rpx">{{ info.sold }} 推荐</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="w-120rpx h-120rpx" @click="TeaSpecialist.handleChat">
|
<view class="w-120rpx h-120rpx">
|
||||||
<wd-img :src="`${OSS}icon/icon_msg.png`" width="120rpx" height="120rpx" placeholder="icon"></wd-img>
|
<wd-img :src="`${OSS}icon/icon_msg.png`" width="120rpx" height="120rpx" placeholder="icon"></wd-img>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -77,10 +81,8 @@
|
|||||||
<view class="bg-[#EBFBF7] h-64rpx rounded-12rpx p-14rpx flex items-center mt-22rpx text-[#35C1A0]">
|
<view class="bg-[#EBFBF7] h-64rpx rounded-12rpx p-14rpx flex items-center mt-22rpx text-[#35C1A0]">
|
||||||
<wd-img :src="`${OSS}icon/icon_heart.png`" width="36rpx" height="36rpx"></wd-img>
|
<wd-img :src="`${OSS}icon/icon_heart.png`" width="36rpx" height="36rpx"></wd-img>
|
||||||
<text class="font-bold text-24rpx leading-34rpx ml-16rpx">服务方式</text>
|
<text class="font-bold text-24rpx leading-34rpx ml-16rpx">服务方式</text>
|
||||||
<text class="ml-20rpx font-400 text-24rpx leading-34rpx">到店服务</text>
|
<text class="ml-20rpx font-400 text-24rpx leading-34rpx" v-if="info.server_type == 1">到店服务</text>
|
||||||
<text class="ml-20rpx font-400 text-24rpx leading-34rpx">上门服务</text>
|
<text class="ml-20rpx font-400 text-24rpx leading-34rpx" v-if="info.server_type == 2">上门服务</text>
|
||||||
<!-- <text class="ml-20rpx font-400 text-24rpx leading-34rpx" v-if="info.server_type == 1 || info.server_type == 3">到店服务</text>
|
|
||||||
<text class="ml-20rpx font-400 text-24rpx leading-34rpx" v-if="info.server_type == 2 || info.server_type == 3">上门服务</text> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 基本属性 -->
|
<!-- 基本属性 -->
|
||||||
@ -89,25 +91,25 @@
|
|||||||
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_gender.png`"
|
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_gender.png`"
|
||||||
class="mr-16rpx"></wd-img>
|
class="mr-16rpx"></wd-img>
|
||||||
<text class="mr-16rpx">性别:</text>
|
<text class="mr-16rpx">性别:</text>
|
||||||
<text class="text-[#303133]">女</text>
|
<text class="text-[#303133]">{{ info.sex }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center text-28rpx text-[#606266]">
|
<view class="flex items-center text-28rpx text-[#606266]">
|
||||||
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_born.png`"
|
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_born.png`"
|
||||||
class="mr-16rpx"></wd-img>
|
class="mr-16rpx"></wd-img>
|
||||||
<text class="mr-16rpx">年龄:</text>
|
<text class="mr-16rpx">年龄:</text>
|
||||||
<text class="text-[#303133]">21岁</text>
|
<text class="text-[#303133]">{{ info.both }}岁</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center text-28rpx text-[#606266]">
|
<view class="flex items-center text-28rpx text-[#606266]">
|
||||||
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_height.png`"
|
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_height.png`"
|
||||||
class="mr-16rpx"></wd-img>
|
class="mr-16rpx"></wd-img>
|
||||||
<text class="mr-16rpx">身高:</text>
|
<text class="mr-16rpx">身高:</text>
|
||||||
<text class="text-[#303133]">165cm</text>
|
<text class="text-[#303133]">{{ info.height }}cm</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center text-28rpx text-[#606266]">
|
<view class="flex items-center text-28rpx text-[#606266]">
|
||||||
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_weight.png`"
|
<wd-img width="40rpx" height="40rpx" :src="`${OSS}icon/icon_weight.png`"
|
||||||
class="mr-16rpx"></wd-img>
|
class="mr-16rpx"></wd-img>
|
||||||
<text class="mr-16rpx">体重:</text>
|
<text class="mr-16rpx">体重:</text>
|
||||||
<text class="text-[#303133]">53kg</text>
|
<text class="text-[#303133]">{{ info.weight }}kg</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -115,7 +117,8 @@
|
|||||||
<view class="mt-36rpx border border-solid border-[#F0F2F5] rounded-14rpx p-24rpx pb-8rpx bg-[#FFFFFF]">
|
<view class="mt-36rpx border border-solid border-[#F0F2F5] rounded-14rpx p-24rpx pb-8rpx bg-[#FFFFFF]">
|
||||||
<view class="flex flex-wrap">
|
<view class="flex flex-wrap">
|
||||||
<view class="flex flex-wrap items-center">
|
<view class="flex flex-wrap items-center">
|
||||||
<view class="mr-8rpx bg-[#4C9F44] text-[#fff] px-10rpx leading-34rpx font-400 text-24rpx rounded-4rpx">123</view>
|
<view class="mr-8rpx bg-[#4C9F44] text-[#fff] px-10rpx leading-34rpx font-400 text-24rpx rounded-4rpx"
|
||||||
|
v-for="item in info.label" :key="item">{{ item }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -135,55 +138,106 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, ref, computed } from 'vue'
|
import { inject, ref, computed } from 'vue'
|
||||||
import { router } from '@/utils/tools'
|
import { router } from '@/utils/tools'
|
||||||
|
import { getTeaSpecialist, getTeaSpecialistDetail } from '@/api/tea-specialist'
|
||||||
|
import type { ITeaSpecialistResult } from '@/api/types/tea-specialist'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
|
|
||||||
// 模拟数据列表
|
// 茶艺师列表及分页参数
|
||||||
const list = ref([
|
const list = ref<any[]>([])
|
||||||
{ name: '春风', level: '初级茶艺师', title: '清风茶艺师', avatar: 'https://picsum.photos/400/400?radom=1', rating: 4.5 },
|
const page = ref(1)
|
||||||
{ name: '春风', level: '初级茶艺师', title: '清风茶艺师', avatar: 'https://picsum.photos/400/400?radom=2', rating: 4.8 },
|
const size = 6
|
||||||
{ name: '夏雪', level: '初级茶艺师', title: '清风茶艺师', avatar: 'https://picsum.photos/400/400?radom=3', rating: 5.0 },
|
const hasMore = ref(true)
|
||||||
{ name: '春风', level: '初级茶艺师', title: '清风茶艺师', avatar: 'https://picsum.photos/400/400?radom=4', rating: 4.2 },
|
|
||||||
{ name: '春风', level: '初级茶艺师', title: '清风茶艺师', avatar: 'https://picsum.photos/400/400?radom=5', rating: 4.5 },
|
|
||||||
{ name: '夏雪', level: '初级茶艺师', title: '清风茶艺师', avatar: 'https://picsum.photos/400/400?radom=6', rating: 4.5 }
|
|
||||||
])
|
|
||||||
|
|
||||||
const selectedIndex = ref(0)
|
const selectedIndex = ref(0)
|
||||||
const selectedSpecialist = computed(() => list.value[selectedIndex.value])
|
const selectedSpecialist = computed(() => list.value[selectedIndex.value])
|
||||||
|
|
||||||
|
const info = ref({
|
||||||
|
team_user_id: 0,
|
||||||
|
name: '', // 茶艺师名字
|
||||||
|
star: 0, // 茶艺师评分
|
||||||
|
level: 1, // 茶艺师等级
|
||||||
|
sold: 0, // 推荐
|
||||||
|
sex: 0, // 性别
|
||||||
|
both: 0, // 年龄
|
||||||
|
weight: 0, // 体重
|
||||||
|
height: 0, // 身高
|
||||||
|
mileage_price: 0, // 车马费
|
||||||
|
server_type: 0, // 服务方式 1到店 2上门 3两者都有
|
||||||
|
label: [], // 专属圈子标签
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
TeaSpecialist.handleGetTeaSpecialistList()
|
||||||
|
})
|
||||||
|
|
||||||
const TeaSpecialist = {
|
const TeaSpecialist = {
|
||||||
|
/**
|
||||||
|
* 获取茶艺师列表,分页加载
|
||||||
|
*/
|
||||||
|
handleGetTeaSpecialistList: async () => {
|
||||||
|
if (!hasMore.value) return
|
||||||
|
|
||||||
|
const storage = uni.getStorageSync('selectedPackageService')
|
||||||
|
const filter = {
|
||||||
|
page: page.value,
|
||||||
|
size,
|
||||||
|
latitude: storage.latitude || import.meta.env.VITE_DEFAULT_LATITUDE,
|
||||||
|
longitude: storage.longitude || import.meta.env.VITE_DEFAULT_LONGITUDE,
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const res = await getTeaSpecialist(filter)
|
||||||
|
const curPageData = res.list || []
|
||||||
|
if (page.value === 1) {
|
||||||
|
list.value = curPageData
|
||||||
|
if (curPageData.length > 0) {
|
||||||
|
selectedIndex.value = 0
|
||||||
|
TeaSpecialist.handleGetTeaSpecialistDetail(curPageData[0].team_user_id)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
list.value = list.value.concat(curPageData)
|
||||||
|
}
|
||||||
|
hasMore.value = curPageData.length === size
|
||||||
|
if (hasMore.value) page.value += 1
|
||||||
|
} catch (e) {
|
||||||
|
uni.showToast({ title: '加载失败', icon: 'none' })
|
||||||
|
}
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 选中某个茶艺师
|
* 选中某个茶艺师
|
||||||
*/
|
*/
|
||||||
handleSelect: (index: number) => {
|
handleSelect: (index: number) => {
|
||||||
selectedIndex.value = index
|
selectedIndex.value = index
|
||||||
|
const item = list.value[index]
|
||||||
|
if (item && item.team_user_id) {
|
||||||
|
TeaSpecialist.handleGetTeaSpecialistDetail(item.team_user_id)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载更多茶艺师
|
* 加载更多茶艺师
|
||||||
*/
|
*/
|
||||||
handleMore: () => {
|
handleMore: () => {
|
||||||
uni.showToast({
|
TeaSpecialist.handleGetTeaSpecialistList()
|
||||||
title: '加载更多',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击聊天
|
* 获取茶艺师详情
|
||||||
*/
|
*/
|
||||||
handleChat: () => {
|
handleGetTeaSpecialistDetail: async (id: number) => {
|
||||||
uni.showToast({
|
const res = await getTeaSpecialistDetail({
|
||||||
title: '打开聊天',
|
team_user_id: id,
|
||||||
icon: 'none'
|
latitude: uni.getStorageSync('latitude') || import.meta.env.VITE_DEFAULT_LATITUDE,
|
||||||
|
longitude: uni.getStorageSync('longitude') || import.meta.env.VITE_DEFAULT_LONGITUDE,
|
||||||
})
|
})
|
||||||
|
info.value = res.teamaster
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下一步
|
* 下一步
|
||||||
*/
|
*/
|
||||||
handleNext: () => {
|
handleNext: () => {
|
||||||
router.navigateTo('/bundle/package/reserve?id=439')
|
router.navigateTo(`/bundle/package/reserve?id=${info.value.team_user_id}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -37,9 +37,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<wd-checkbox-group v-model="form.other_requirements" shape="square" checked-color="#4C9F44">
|
<wd-checkbox-group v-model="form.other_requirements" shape="square" checked-color="#4C9F44">
|
||||||
<view class="flex flex-wrap">
|
<view class="flex flex-wrap">
|
||||||
<view class="w-1/2 mb-30rpx"><wd-checkbox modelValue="需要金牌茶艺师">需要金牌茶艺师</wd-checkbox></view>
|
<view class="w-1/2 mb-30rpx"><wd-checkbox :modelValue="1">需要云华茶艺师</wd-checkbox></view>
|
||||||
<view class="w-1/2 mb-30rpx"><wd-checkbox modelValue="需要茶艺师导师">需要茶艺师导师</wd-checkbox></view>
|
<view class="w-1/2 mb-30rpx"><wd-checkbox :modelValue="2">需要茶艺师导师</wd-checkbox></view>
|
||||||
<view class="w-1/2"><wd-checkbox modelValue="需要茶技">需要茶技</wd-checkbox></view>
|
<view class="w-1/2"><wd-checkbox :modelValue="3">需要茶技</wd-checkbox></view>
|
||||||
</view>
|
</view>
|
||||||
</wd-checkbox-group>
|
</wd-checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,16 +1,14 @@
|
|||||||
<route lang="jsonc" type="page">
|
<route lang="jsonc" type="page">{
|
||||||
{
|
|
||||||
"needLogin": true,
|
"needLogin": true,
|
||||||
"layout": "default",
|
"layout": "default",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}
|
}</route>
|
||||||
</route>
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view>
|
||||||
<view class="">
|
<view>
|
||||||
<wd-navbar safeAreaInsetTop :bordered="false" custom-style="background-color: #F6F7F8 !important;">
|
<wd-navbar safeAreaInsetTop :bordered="false" custom-style="background-color: #F6F7F8 !important;">
|
||||||
<template #left>
|
<template #left>
|
||||||
<view class="flex items-center" @click="router.switchTab('/pages/my/my')">
|
<view class="flex items-center" @click="router.switchTab('/pages/my/my')">
|
||||||
@ -28,7 +26,7 @@
|
|||||||
<!-- 待审核 -->
|
<!-- 待审核 -->
|
||||||
<view class="mt-84rpx" v-if="status === 0">
|
<view class="mt-84rpx" v-if="status === 0">
|
||||||
<view class="flex justify-center items-center">
|
<view class="flex justify-center items-center">
|
||||||
<wd-img width="300rpx" height="278rpx" :src="`${OSS}images/settle_in/settle_in_image2.png`"/>
|
<wd-img width="300rpx" height="278rpx" :src="`${OSS}images/settle_in/settle_in_image2.png`" />
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-60rpx text-center">
|
<view class="mt-60rpx text-center">
|
||||||
<view class="text-36rpx leading-50rpx text-#303133">您的信息已成功提交</view>
|
<view class="text-36rpx leading-50rpx text-#303133">您的信息已成功提交</view>
|
||||||
@ -39,20 +37,27 @@
|
|||||||
<!-- 申请成功提示 -->
|
<!-- 申请成功提示 -->
|
||||||
<view class="mt-84rpx" v-if="status === 1">
|
<view class="mt-84rpx" v-if="status === 1">
|
||||||
<view class="flex justify-center items-center">
|
<view class="flex justify-center items-center">
|
||||||
<wd-img width="300rpx" height="278rpx" :src="`${OSS}images/settle_in/settle_in_image1.png`"/>
|
<wd-img width="300rpx" height="278rpx" :src="`${OSS}images/settle_in/settle_in_image1.png`" />
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-60rpx text-center">
|
<view class="mt-60rpx text-center">
|
||||||
<view class="text-36rpx leading-50rpx text-#303133">申请茶艺师成功</view>
|
<view class="text-36rpx leading-50rpx text-#303133">申请茶艺师成功</view>
|
||||||
<view class="font-400 text-26rpx leading-42rpx text-#9CA3AF mt-28rpx mx-102rpx">请登录【茶址茶艺师】小程序查看信息进行操作,如有疑问请联系平台</view>
|
<view class="font-400 text-26rpx leading-42rpx text-#9CA3AF mt-28rpx mx-102rpx">
|
||||||
|
请登录【茶址茶艺师】小程序查看信息进行操作,如有疑问请联系平台
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template v-if="status >= 2">
|
<template v-if="status >= 2">
|
||||||
<view class="mx-30rpx mt-38rpx">
|
<view class="mx-30rpx mt-38rpx">
|
||||||
<!-- 营业执照 -->
|
<!-- 茶艺师资格证书 -->
|
||||||
<!-- <view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
||||||
<view class="text-32rpx leading-44rpx text-#303133 mb-32rpx">营业执照</view>
|
<view class="flex items-center">
|
||||||
<view class="">
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">茶艺师资格证书</view>
|
||||||
|
<view class="flex items-center">
|
||||||
|
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mt-32rpx flex items-center">
|
||||||
<wd-upload
|
<wd-upload
|
||||||
:header="{'token': token}"
|
:header="{'token': token}"
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
@ -60,14 +65,14 @@
|
|||||||
image-mode="scaleToFill"
|
image-mode="scaleToFill"
|
||||||
:action="action">
|
:action="action">
|
||||||
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
<view class="">
|
<view>
|
||||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#303133">营业执照</view>
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">资格证书</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-upload>
|
</wd-upload>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<view class="bg-white rounded-16rpx px-30rpx pt-28rpx mt-20rpx">
|
<view class="bg-white rounded-16rpx px-30rpx pt-28rpx mt-20rpx">
|
||||||
@ -87,19 +92,25 @@
|
|||||||
|
|
||||||
<view class="mt-22rpx">
|
<view class="mt-22rpx">
|
||||||
<view class="text-26rpx leading-32rpx text-#606266">性别</view>
|
<view class="text-26rpx leading-32rpx text-#606266">性别</view>
|
||||||
<view class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx tea-specialist-cell">
|
<view
|
||||||
<wd-picker placeholder="请选择性别" :columns="genderColumns" v-model="form.gender" @confirm="TeaSpecialist.handleConfirmGender" />
|
class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx tea-specialist-cell">
|
||||||
|
<wd-picker placeholder="请选择性别" :columns="genderColumns" v-model="form.gender"
|
||||||
|
@confirm="TeaSpecialist.handleConfirmGender" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-22rpx">
|
<view class="mt-22rpx">
|
||||||
<view class="text-26rpx leading-32rpx text-#606266">出生年月</view>
|
<view class="text-26rpx leading-32rpx text-#606266">出生年月</view>
|
||||||
<view class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx tea-specialist-cell">
|
<view
|
||||||
<wd-datetime-picker placeholder="请选择出生年月" v-model="form.both" :minDate="new Date(1970, 0, 1).getTime()" :maxDate="new Date().getTime()" type="date" @confirm="TeaSpecialist.handleConfirmBoth"></wd-datetime-picker>
|
class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx tea-specialist-cell">
|
||||||
|
<wd-datetime-picker placeholder="请选择出生年月" v-model="form.both"
|
||||||
|
:minDate="new Date(1970, 0, 1).getTime()" :maxDate="new Date().getTime()"
|
||||||
|
type="date" @confirm="TeaSpecialist.handleConfirmBoth"></wd-datetime-picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-22rpx flex items-center justify-between border-b border-b-solid border-b-[#F6F7F8] pb-20rpx">
|
<view
|
||||||
|
class="mt-22rpx flex items-center justify-between border-b border-b-solid border-b-[#F6F7F8] pb-20rpx">
|
||||||
<view class="mr-166rpx">
|
<view class="mr-166rpx">
|
||||||
<view class="text-26rpx leading-32rpx text-#606266">身高</view>
|
<view class="text-26rpx leading-32rpx text-#606266">身高</view>
|
||||||
<view class="mt-20rpx flex items-center">
|
<view class="mt-20rpx flex items-center">
|
||||||
@ -122,19 +133,17 @@
|
|||||||
<!-- 专属圈子 -->
|
<!-- 专属圈子 -->
|
||||||
<view class="bg-white rounded-16rpx px-30rpx py-32rpx mt-20rpx">
|
<view class="bg-white rounded-16rpx px-30rpx py-32rpx mt-20rpx">
|
||||||
<view class="text-32rpx leading-44rpx text-#303133 mb-32rpx flex items-center">
|
<view class="text-32rpx leading-44rpx text-#303133 mb-32rpx flex items-center">
|
||||||
专属圈子 <text class="text-[#818CA9] ml-10rpx text-20rpx mt-4rpx">最多可选6个</text>
|
专属圈子
|
||||||
|
<view class="flex items-center">
|
||||||
|
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||||
|
</view>
|
||||||
|
<text class="text-[#818CA9] ml-10rpx text-20rpx mt-4rpx">最多可选6个</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="flex items-center flex-wrap">
|
<view class="flex items-center flex-wrap">
|
||||||
<view
|
<view v-for="item in exclusiveCirclesLabel" :key="item.id" class="tea-tag" :style="selectedTags.includes(item.id) ? 'background:#4C9F44;color:#fff;' : 'background:#F3F3F3;color:#818CA9;'
|
||||||
v-for="(item, idx) in tagList"
|
" @click="handleTagClick(item.id)">
|
||||||
:key="item.id"
|
{{ item.label_name }}
|
||||||
class="tea-tag"
|
|
||||||
:style="selectedTags.includes(item.id) ?'background:#4C9F44;color:#fff;' : 'background:#F3F3F3;color:#818CA9;'
|
|
||||||
"
|
|
||||||
@click="handleTagClick(item.id)"
|
|
||||||
>
|
|
||||||
{{ item.title }}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -149,9 +158,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 ml-80rpx">
|
<view class="flex-1 ml-80rpx">
|
||||||
<wd-picker :columns="openCityList" label-key="name" value-key="id" v-model="form.city_id" use-default-slot @confirm="TeaSpecialist.handleConfirmAddress">
|
<wd-picker :columns="openCityList" label-key="name" value-key="id" v-model="form.city_id"
|
||||||
|
use-default-slot @confirm="TeaSpecialist.handleConfirmAddress">
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<wd-input readonly v-model="city" size="large" placeholder="请选择地区" no-border placeholderStyle="font-size: 30rpx; line-height: 42rpx; color: #c9c9c9;"></wd-input>
|
<wd-input readonly v-model="city" size="large" placeholder="请选择地区" no-border
|
||||||
|
placeholderStyle="font-size: 30rpx; line-height: 42rpx; color: #c9c9c9;"></wd-input>
|
||||||
<wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
|
<wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
|
||||||
</view>
|
</view>
|
||||||
</wd-picker>
|
</wd-picker>
|
||||||
@ -168,66 +179,63 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-32rpx">
|
<view class="mt-32rpx">
|
||||||
<wd-upload
|
<wd-upload :header="{ 'token': token }" v-model:file-list="fileList2" :limit="1"
|
||||||
:header="{'token': token}"
|
image-mode="scaleToFill" :action="action">
|
||||||
v-model:file-list="fileList2"
|
<view
|
||||||
:limit="1"
|
class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
image-mode="scaleToFill"
|
|
||||||
:action="action">
|
|
||||||
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
|
||||||
<view class="">
|
<view class="">
|
||||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`"
|
||||||
|
mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#303133">本人照片</view>
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">本人头像</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-upload>
|
</wd-upload>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 健康证、资格证书信息 -->
|
<!-- 健康证书信息 -->
|
||||||
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">健康证、资格证书信息</view>
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">健康证</view>
|
||||||
<!-- <view class="flex items-center">
|
|
||||||
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-32rpx flex items-center">
|
<view class="mt-32rpx flex items-center">
|
||||||
<view class="mr-16rpx">
|
<view class="mr-16rpx">
|
||||||
<wd-upload
|
<wd-upload :header="{ 'token': token }" v-model:file-list="fileList3" :limit="1"
|
||||||
:header="{'token': token}"
|
image-mode="scaleToFill" :action="action">
|
||||||
v-model:file-list="fileList3"
|
<view
|
||||||
:limit="1"
|
class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
image-mode="scaleToFill"
|
|
||||||
:action="action">
|
|
||||||
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
|
||||||
<view class="">
|
<view class="">
|
||||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`"
|
||||||
|
mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#303133">健康证</view>
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">健康证</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-upload>
|
</wd-upload>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
|
||||||
<wd-upload
|
</view>
|
||||||
:header="{'token': token}"
|
</view>
|
||||||
v-model:file-list="fileList4"
|
|
||||||
:limit="1"
|
<!-- 个人展示 -->
|
||||||
image-mode="scaleToFill"
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
||||||
:action="action">
|
<view class="flex items-center">
|
||||||
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">个人展示</view>
|
||||||
<view class="">
|
</view>
|
||||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
|
||||||
</view>
|
<view class="mt-32rpx">
|
||||||
<view class="flex items-center">
|
<wd-upload :header="{ 'token': token }" v-model:file-list="fileList4" :limit="9" multiple
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#303133">茶艺师资格证</view>
|
image-mode="scaleToFill" :action="action">
|
||||||
<view class="flex items-center">
|
<view
|
||||||
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
</view>
|
<view class="">
|
||||||
</view>
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`"
|
||||||
|
mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</wd-upload>
|
<view class="flex items-center">
|
||||||
</view>
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">个人展示</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</wd-upload>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -250,17 +258,25 @@
|
|||||||
<view class="mt-22rpx">
|
<view class="mt-22rpx">
|
||||||
<view class="text-26rpx leading-32rpx text-#606266">验证码</view>
|
<view class="text-26rpx leading-32rpx text-#606266">验证码</view>
|
||||||
<view class="mt-20rpx pb-20rpx">
|
<view class="mt-20rpx pb-20rpx">
|
||||||
<wd-input type="text" placeholder="请填写手机验证码" v-model="form.code" inputmode="numeric" no-border>
|
<wd-input type="text" placeholder="请填写手机验证码" v-model="form.code" inputmode="numeric"
|
||||||
<template #suffix>
|
no-border>
|
||||||
|
<template #suffix>
|
||||||
<view class="flex items-center mr-34rpx">
|
<view class="flex items-center mr-34rpx">
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="text-[#4C9F44] text-28rpx font-400 leading-40rpx" v-if="!startCountDown" @click="TeaSpecialist.handleCountDown">发送验证码</view>
|
<view class="text-[#4C9F44] text-28rpx font-400 leading-40rpx"
|
||||||
<view class="!text-[#C9C9C9] text-28rpx font-400 leading-40rpx flex items-center" v-if="startCountDown">
|
v-if="!startCountDown" @click="TeaSpecialist.handleCountDown">发送验证码
|
||||||
<wd-count-down ref="countDown" :time="countDownTime" millisecond :auto-start="false" format="ss" custom-class="!text-[#C9C9C9] !text-32rpx" @finish="TeaSpecialist.handleFinishCountDown"></wd-count-down>
|
</view>
|
||||||
|
<view
|
||||||
|
class="!text-[#C9C9C9] text-28rpx font-400 leading-40rpx flex items-center"
|
||||||
|
v-if="startCountDown">
|
||||||
|
<wd-count-down ref="countDown" :time="countDownTime" millisecond
|
||||||
|
:auto-start="false" format="ss"
|
||||||
|
custom-class="!text-[#C9C9C9] !text-32rpx"
|
||||||
|
@finish="TeaSpecialist.handleFinishCountDown"></wd-count-down>
|
||||||
<view> S后重发</view>
|
<view> S后重发</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</wd-input>
|
</wd-input>
|
||||||
</view>
|
</view>
|
||||||
@ -272,9 +288,12 @@
|
|||||||
*提交表单申请,工作人员将在3个工作日内与您电话联系,如需及时了解,请直接电话咨询,我们将在第一时间解答
|
*提交表单申请,工作人员将在3个工作日内与您电话联系,如需及时了解,请直接电话咨询,我们将在第一时间解答
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center text-[#303133] mt-112rpx pb-66rpx">
|
<view
|
||||||
<view class="w-330rpx h-90rpx bg-[#FFFFFF] rounded-8rpx mr-30rpx" @click="router.navigateTo('/bundle/contact/contact')">联系我们</view>
|
class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center text-[#303133] mt-112rpx pb-66rpx">
|
||||||
<view class="w-330rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-#fff" @click="TeaSpecialist.handleSubmit">提交申请</view>
|
<view class="w-330rpx h-90rpx bg-[#FFFFFF] rounded-8rpx mr-30rpx"
|
||||||
|
@click="router.navigateTo('/bundle/contact/contact')">联系我们</view>
|
||||||
|
<view class="w-330rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-#fff" @click="TeaSpecialist.handleSubmit">
|
||||||
|
提交申请</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -282,289 +301,293 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { router, removeImageUrlPrefix, strToParams } from '@/utils/tools'
|
import { router, removeImageUrlPrefix, strToParams } from '@/utils/tools'
|
||||||
import { getOpenCityList } from '@/api/tea-room'
|
import { getOpenCityList } from '@/api/tea-room'
|
||||||
import { useToast } from 'wot-design-uni'
|
import { useToast } from 'wot-design-uni'
|
||||||
import { getVerificationCode, addTeaSpecialist, getTeaSpecialistStatus } from '@/api/user'
|
import { getVerificationCode, addTeaSpecialist, getTeaSpecialistStatus } from '@/api/user'
|
||||||
import { SMS_ENUM } from '@/enum/sms'
|
import { getExclusiveCirclesLabel } from '@/api/tea-specialist'
|
||||||
import { mobile } from '@/utils/test'
|
import { SMS_ENUM } from '@/enum/sms'
|
||||||
|
import { mobile } from '@/utils/test'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
const token = ref<string>('') // 用户token
|
const token = ref<string>('') // 用户token
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
||||||
// 已开通城市列表
|
// 已开通城市列表
|
||||||
const openCityList = ref<Array<any>>([])
|
const openCityList = ref<Array<any>>([])
|
||||||
const city = ref<string>('')
|
const city = ref<string>('')
|
||||||
|
|
||||||
// 审核提示
|
// 性别
|
||||||
const tips = ref<boolean>(false)
|
const genderColumns = ['女', '男']
|
||||||
|
|
||||||
// 性别
|
// 上传文件
|
||||||
const genderColumns = ['女', '男']
|
const fileList = ref<any[]>([]) // 资格证
|
||||||
|
const fileList2 = ref<any[]>([]) // 照片信息
|
||||||
|
const fileList3 = ref<any[]>([]) // 个人展示
|
||||||
|
const fileList4 = ref<any[]>([]) // 健康证
|
||||||
|
const action = import.meta.env.VITE_UPLOAD_BASEURL
|
||||||
|
|
||||||
// 上传文件
|
// 验证码倒计时
|
||||||
const fileList = ref<any[]>([]) // 营业执照
|
const countDownTime = ref<number>(1 * 60 * 1000) // 60s倒计时
|
||||||
const fileList2 = ref<any[]>([]) // 照片信息
|
const startCountDown = ref<boolean>(false) // 是否开始倒计时
|
||||||
const fileList3 = ref<any[]>([]) // 健康证
|
const countDown = ref<any>(null) // 倒计时组件
|
||||||
const fileList4 = ref<any[]>([]) // 资格证
|
|
||||||
const action = import.meta.env.VITE_UPLOAD_BASEURL
|
|
||||||
|
|
||||||
// 验证码倒计时
|
// 标签点击事件
|
||||||
const countDownTime = ref<number>(1 * 60 * 1000) // 60s倒计时
|
function handleTagClick(id: number) {
|
||||||
const startCountDown = ref<boolean>(false) // 是否开始倒计时
|
const idx = selectedTags.value.indexOf(id)
|
||||||
const countDown = ref<any>(null) // 倒计时组件
|
if (idx > -1) {
|
||||||
|
selectedTags.value.splice(idx, 1)
|
||||||
// 专属圈子tag颜色
|
} else {
|
||||||
const tagList = [
|
if (selectedTags.value.length < 6) {
|
||||||
{title: '茶艺表演', id: 1},
|
selectedTags.value.push(id)
|
||||||
{title: '茶艺培训', id: 2},
|
|
||||||
{title: '茶文化推广', id: 3},
|
|
||||||
{title: '茶艺比赛', id: 4},
|
|
||||||
{title: '茶艺研究', id: 5},
|
|
||||||
{title: '其他', id: 6},
|
|
||||||
{title: '关单', id: 7},
|
|
||||||
]
|
|
||||||
|
|
||||||
// 选中的标签id数组
|
|
||||||
const selectedTags = ref<number[]>([])
|
|
||||||
|
|
||||||
// 标签点击事件
|
|
||||||
function handleTagClick(id: number) {
|
|
||||||
const idx = selectedTags.value.indexOf(id)
|
|
||||||
if (idx > -1) {
|
|
||||||
selectedTags.value.splice(idx, 1)
|
|
||||||
} else {
|
} else {
|
||||||
if (selectedTags.value.length < 6) {
|
toast.show('最多只能选择6个圈子')
|
||||||
selectedTags.value.push(id)
|
|
||||||
} else {
|
|
||||||
toast.show('最多只能选择6个圈子')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 表单
|
// 表单
|
||||||
const form = ref<{
|
const form = ref<{
|
||||||
license_img: string // 营业执照
|
license_img: string // 营业执照
|
||||||
username: string // 茶艺师名字
|
username: string // 茶艺师名字
|
||||||
gender: number // 茶艺师性别(1男 2女)
|
gender: number // 茶艺师性别(1男 2女)
|
||||||
both: number | string // 出生年月
|
both: number | string // 出生年月
|
||||||
height: string // 身高
|
height: string // 身高
|
||||||
weight: string // 体重
|
weight: string // 体重
|
||||||
hobby_introduce: string // 兴趣爱好介绍
|
city_id: number // 城市ID
|
||||||
city_id: number // 城市ID
|
avatar: string // 头像
|
||||||
avatar: string // 头像
|
mobile: string // 联系电话
|
||||||
certificate: string // 健康证、资格证书信息
|
code: string // 验证码
|
||||||
mobile: string // 联系电话
|
health_certificate?: string // 健康证
|
||||||
code: string // 验证码
|
information?: string // 个人展示
|
||||||
broker_id?: number // 经纪人ID(可选,扫码绑定经纪人时携带)
|
broker_user_id?: number // 经纪人ID(可选,扫码绑定经纪人时携带)
|
||||||
}>({
|
label_id?: string // 专属圈子标签ID,逗号分隔
|
||||||
license_img: '',
|
}>({
|
||||||
username: '',
|
license_img: '',
|
||||||
gender: 2,
|
username: '',
|
||||||
both: '',
|
gender: 2,
|
||||||
height: '',
|
both: '',
|
||||||
weight: '',
|
height: '',
|
||||||
hobby_introduce: '',
|
weight: '',
|
||||||
city_id: 0,
|
city_id: 0,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
certificate: '',
|
mobile: '',
|
||||||
mobile: '',
|
code: '',
|
||||||
code: '',
|
health_certificate: '',
|
||||||
broker_id: 0 // 经纪人ID(可选,扫码绑定经纪人时携带)
|
information: '',
|
||||||
})
|
broker_user_id: 0, // 经纪人ID(可选,扫码绑定经纪人时携带)
|
||||||
const both = ref<string>('1998-12-21')
|
label_id: '' // 专属圈子标签ID,逗号分隔
|
||||||
|
})
|
||||||
|
const both = ref<string>('1998-12-21')
|
||||||
|
|
||||||
// 审核状态
|
// 审核状态
|
||||||
const status = ref<number>(3) // 0待审核 1审核成功 2审核失败 3未提交数据
|
const status = ref<number>(3) // 0待审核 1审核成功 2审核失败 3未提交数据
|
||||||
|
|
||||||
onLoad(async (args) => {
|
// 专属圈子标签
|
||||||
// 默认出生年月为1998年12月21日
|
const selectedTags = ref<number[]>([])
|
||||||
form.value.both = new Date(1998, 11, 21).getTime()
|
const exclusiveCirclesLabel = ref<Array<any>>([])
|
||||||
|
|
||||||
// 处理扫码携带的参数(茶艺师绑定经纪人)
|
onLoad(async (args) => {
|
||||||
const scene = args?.scene
|
// 默认出生年月为1998年12月21日
|
||||||
if (scene) {
|
form.value.both = new Date(1998, 11, 21).getTime()
|
||||||
form.value.broker_id = strToParams(decodeURIComponent(args.scene))?.brokerid
|
|
||||||
|
// 处理扫码携带的参数(茶艺师绑定经纪人)
|
||||||
|
const scene = args?.scene
|
||||||
|
if (scene) {
|
||||||
|
form.value.broker_user_id = strToParams(decodeURIComponent(args.scene))?.brokerid
|
||||||
|
}
|
||||||
|
|
||||||
|
TeaSpecialist.handleInit()
|
||||||
|
})
|
||||||
|
|
||||||
|
onShow(async () => {
|
||||||
|
token.value = uni.getStorageSync('token')
|
||||||
|
if (token.value) {
|
||||||
|
const res = await getTeaSpecialistStatus()
|
||||||
|
status.value = res.status
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const TeaSpecialist = {
|
||||||
|
/**
|
||||||
|
* 初始化
|
||||||
|
*/
|
||||||
|
handleInit: async () => {
|
||||||
|
const res = await getOpenCityList()
|
||||||
|
openCityList.value = res.list
|
||||||
|
|
||||||
|
const label = await getExclusiveCirclesLabel()
|
||||||
|
exclusiveCirclesLabel.value = label
|
||||||
|
},
|
||||||
|
|
||||||
|
// 选择性别
|
||||||
|
handleConfirmGender: (gender: string) => {
|
||||||
|
console.log("🚀 ~ gender:", gender)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 发送验证码
|
||||||
|
handleCountDown: async () => {
|
||||||
|
if (!mobile(form.value.mobile)) {
|
||||||
|
toast.show('请检查手机号码')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
TeaSpecialist.handleInit()
|
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(form.value.mobile) })
|
||||||
})
|
|
||||||
|
|
||||||
onShow(async () => {
|
startCountDown.value = true
|
||||||
token.value = uni.getStorageSync('token')
|
setTimeout(() => {
|
||||||
if (token.value) {
|
countDown.value.start()
|
||||||
const res = await getTeaSpecialistStatus()
|
}, 100)
|
||||||
// status.value = res.status
|
},
|
||||||
status.value = 3
|
|
||||||
|
// 验证码倒计时结束
|
||||||
|
handleFinishCountDown: () => {
|
||||||
|
startCountDown.value = false
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认选择地址
|
||||||
|
*/
|
||||||
|
handleConfirmAddress: (item) => {
|
||||||
|
city.value = item.selectedItems.name
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
handleConfirmBoth({ value }: any) {
|
||||||
|
const d = new Date(value)
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = d.getMonth() + 1
|
||||||
|
const day = d.getDate()
|
||||||
|
const date = `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`
|
||||||
|
both.value = date
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交申请
|
||||||
|
*/
|
||||||
|
handleSubmit: async () => {
|
||||||
|
if (fileList.value.length == 0) {
|
||||||
|
toast.show('请上传茶艺师资格证书')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
const TeaSpecialist = {
|
if (!form.value.username) {
|
||||||
/**
|
toast.show('请输入姓名')
|
||||||
* 初始化
|
return false
|
||||||
*/
|
}
|
||||||
handleInit: async () => {
|
|
||||||
const res = await getOpenCityList()
|
if (!form.value.username) {
|
||||||
openCityList.value = res.list
|
toast.show('请输入姓名')
|
||||||
},
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// 选择性别
|
if (!form.value.both) {
|
||||||
handleConfirmGender: (gender: string) => {
|
toast.show('请选择出生年月')
|
||||||
console.log("🚀 ~ gender:", gender)
|
return false
|
||||||
},
|
}
|
||||||
|
|
||||||
// 发送验证码
|
if (!form.value.height) {
|
||||||
handleCountDown: async () => {
|
toast.show('请输入身高')
|
||||||
if (!mobile(form.value.mobile)) {
|
return false
|
||||||
toast.show('请检查手机号码')
|
}
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(form.value.mobile) })
|
if (!form.value.weight) {
|
||||||
|
toast.show('请输入体重')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 专属圈子校验
|
||||||
|
if (selectedTags.value.length === 0) {
|
||||||
|
toast.show('请至少选择一个专属圈子')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedTags.value.length > 6) {
|
||||||
|
toast.show('最多只能选择6个专属圈子')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!form.value.city_id) {
|
||||||
|
toast.show('请选择服务区域')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileList2.value.length == 0) {
|
||||||
|
toast.show('请上传本人头像')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mobile(form.value.mobile)) {
|
||||||
|
toast.show('请检查手机号码')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!form.value.code) {
|
||||||
|
toast.show('请输入验证码')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
form.value.label_id = selectedTags.value.join(',') // 专属圈子标签ID,逗号分隔
|
||||||
|
form.value.license_img = fileList.value.length > 0 ? removeImageUrlPrefix(fileList.value)[0] : '' // 茶艺师资格证书
|
||||||
|
form.value.avatar = fileList2.value.length > 0 ? removeImageUrlPrefix(fileList2.value)[0] : '' // 个人照片
|
||||||
|
form.value.health_certificate = fileList3.value.length > 0 ? removeImageUrlPrefix(fileList3.value)[0] : '' // 健康证
|
||||||
|
form.value.information = fileList4.value.length > 0 ? removeImageUrlPrefix(fileList4.value) : '' // 个人展示
|
||||||
|
form.value.information = Array.isArray(form.value.information) ? form.value.information.join(',') : form.value.information
|
||||||
|
|
||||||
|
let data = form.value
|
||||||
|
data.both = both.value
|
||||||
|
|
||||||
|
toast.loading({
|
||||||
|
loadingType: 'ring',
|
||||||
|
loadingColor: '#4C9F44',
|
||||||
|
msg: '提交中...'
|
||||||
|
})
|
||||||
|
try {
|
||||||
|
toast.close()
|
||||||
|
|
||||||
|
await addTeaSpecialist(data)
|
||||||
|
status.value = 0 // 提交成功,变更状态为待审核
|
||||||
|
|
||||||
startCountDown.value = true
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
countDown.value.start()
|
toast.success('提交成功')
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
} catch (e) {
|
||||||
|
toast.close()
|
||||||
// 验证码倒计时结束
|
return
|
||||||
handleFinishCountDown: () => {
|
|
||||||
startCountDown.value = false
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 确认选择地址
|
|
||||||
*/
|
|
||||||
handleConfirmAddress: (item) => {
|
|
||||||
city.value = item.selectedItems.name
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
handleConfirmBoth({ value }: any) {
|
|
||||||
const d = new Date(value)
|
|
||||||
const year = d.getFullYear()
|
|
||||||
const month = d.getMonth() + 1
|
|
||||||
const day = d.getDate()
|
|
||||||
const date = `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`
|
|
||||||
both.value = date
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 提交申请
|
|
||||||
*/
|
|
||||||
handleSubmit: async () => {
|
|
||||||
if (!form.value.username) {
|
|
||||||
toast.show('请输入姓名')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!form.value.both) {
|
|
||||||
toast.show('请选择出生年月')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!form.value.height) {
|
|
||||||
toast.show('请输入身高')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!form.value.weight) {
|
|
||||||
toast.show('请输入体重')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!form.value.city_id) {
|
|
||||||
toast.show('请选择服务区域')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fileList2.value.length == 0) {
|
|
||||||
toast.show('请上传本人照片')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fileList4.value.length == 0) {
|
|
||||||
toast.show('请上传茶艺师资格证书')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mobile(form.value.mobile)) {
|
|
||||||
toast.show('请检查手机号码')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!form.value.code) {
|
|
||||||
toast.show('请输入验证码')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
form.value.license_img = fileList.value.length > 0 ? removeImageUrlPrefix(fileList.value)[0] : ''
|
|
||||||
form.value.avatar = fileList2.value.length > 0 ? removeImageUrlPrefix(fileList2.value)[0] : ''
|
|
||||||
|
|
||||||
if (fileList3.value.length > 0 && fileList4.value.length > 0) {
|
|
||||||
form.value.certificate = removeImageUrlPrefix(fileList3.value)[0] + ',' + removeImageUrlPrefix(fileList4.value)[0]
|
|
||||||
} else if (fileList3.value.length > 0) {
|
|
||||||
form.value.certificate = removeImageUrlPrefix(fileList3.value)[0] + "," + ""
|
|
||||||
} else if (fileList4.value.length > 0) {
|
|
||||||
form.value.certificate = "" + "," +removeImageUrlPrefix(fileList4.value)[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
let data = form.value
|
|
||||||
data.both = both.value
|
|
||||||
|
|
||||||
toast.loading({
|
|
||||||
loadingType: 'ring',
|
|
||||||
loadingColor: '#4C9F44',
|
|
||||||
msg: '提交中...'
|
|
||||||
})
|
|
||||||
try {
|
|
||||||
toast.close()
|
|
||||||
|
|
||||||
await addTeaSpecialist(data)
|
|
||||||
status.value = 0 // 提交成功,变更状态为待审核
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
toast.success('提交成功')
|
|
||||||
}, 100)
|
|
||||||
} catch(e) {
|
|
||||||
toast.close()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background: $cz-page-background;
|
background: $cz-page-background;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tea-specialist-cell {
|
.tea-specialist-cell {
|
||||||
:deep() {
|
:deep() {
|
||||||
.wd-cell {
|
.wd-cell {
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wd-cell__wrapper {
|
.wd-cell__wrapper {
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
padding-bottom: 0 !important;
|
padding-bottom: 0 !important;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tea-tag {
|
.tea-tag {
|
||||||
padding: 0 8rpx;
|
padding: 0 8rpx;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -27,24 +27,24 @@
|
|||||||
const levelMap = {
|
const levelMap = {
|
||||||
gold: {
|
gold: {
|
||||||
icon: `${OSS}icon/icon_gold_medal.png`,
|
icon: `${OSS}icon/icon_gold_medal.png`,
|
||||||
text: '金牌茶艺师'
|
text: '云华茶艺师'
|
||||||
},
|
},
|
||||||
senior: {
|
senior: {
|
||||||
icon: `${OSS}icon/icon_senior_medal.png`,
|
icon: `${OSS}icon/icon_senior_medal.png`,
|
||||||
text: '高级茶艺师'
|
text: '竹影茶艺师'
|
||||||
},
|
},
|
||||||
intermediate: {
|
intermediate: {
|
||||||
icon: `${OSS}icon/icon_intermediate_medal.png`,
|
icon: `${OSS}icon/icon_intermediate_medal.png`,
|
||||||
text: '中级茶艺师'
|
text: '明月茶艺师'
|
||||||
},
|
},
|
||||||
junior: {
|
junior: {
|
||||||
icon: `${OSS}icon/icon_junior_medal.png`,
|
icon: `${OSS}icon/icon_junior_medal.png`,
|
||||||
text: '初级茶艺师'
|
text: '清风茶艺师'
|
||||||
},
|
},
|
||||||
enthusiast: {
|
// enthusiast: {
|
||||||
icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
// icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
||||||
text: '茶艺爱好者'
|
// text: '茶艺爱好者'
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -73,8 +73,13 @@
|
|||||||
|
|
||||||
// 可用优惠券数量
|
// 可用优惠券数量
|
||||||
const useCoupon = ref<number>(0)
|
const useCoupon = ref<number>(0)
|
||||||
|
|
||||||
|
// 优惠券类型
|
||||||
|
const typeId = ref<number>(1) // 1茶艺师 2茶室 3个人中心 4套餐优惠券,这个页面是普通的茶艺师列表和茶艺师套餐列表共用的,所以需要区分
|
||||||
|
|
||||||
onLoad(async (args) => {
|
onLoad(async (args) => {
|
||||||
|
typeId.value = args.typeId || 1
|
||||||
|
|
||||||
teaRoomId.value = args.id
|
teaRoomId.value = args.id
|
||||||
checkedId.value = args.couponId || 0
|
checkedId.value = args.couponId || 0
|
||||||
|
|
||||||
@ -87,15 +92,7 @@
|
|||||||
* 初始化优惠券列表
|
* 初始化优惠券列表
|
||||||
*/
|
*/
|
||||||
handleInitCoupon: async (price) => {
|
handleInitCoupon: async (price) => {
|
||||||
// const res = await getTeaSpecialistCoupons()
|
const res = await getCoupons({type_id: typeId.value, price}) // 1茶艺师 2茶室 3个人中心 4套餐优惠券
|
||||||
// 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 个人中心
|
|
||||||
useCoupon.value = res.count.yes_use
|
useCoupon.value = res.count.yes_use
|
||||||
couponList.value.use = res.result.filter(item => item.is_use == 0)
|
couponList.value.use = res.result.filter(item => item.is_use == 0)
|
||||||
console.log("🚀 ~ couponList.value.use:", couponList.value.use)
|
console.log("🚀 ~ couponList.value.use:", couponList.value.use)
|
||||||
|
|||||||
@ -185,8 +185,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#606266">专属圈子</view>
|
<view class="font-400 text-26rpx leading-36rpx text-#606266">专属圈子</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex flex-wrap items-center mt-16rpx">
|
<view class="flex flex-wrap items-center mt-16rpx" v-for="(item, index) in info.label" :key="index">
|
||||||
<view class="mr-8rpx bg-[#4C9F44] text-[#fff] px-10rpx leading-34rpx font-400 text-24rpx rounded-4rpx">123</view>
|
<view class="mr-8rpx bg-[#4C9F44] text-[#fff] px-10rpx leading-34rpx font-400 text-24rpx rounded-4rpx">{{ item }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -329,6 +329,7 @@ const info = ref({
|
|||||||
price: 0, // 服务费
|
price: 0, // 服务费
|
||||||
mileage_price: 0, // 车马费
|
mileage_price: 0, // 车马费
|
||||||
server_type: 0, // 服务方式 1到店 2上门 3两者都有
|
server_type: 0, // 服务方式 1到店 2上门 3两者都有
|
||||||
|
label: [], // 专属圈子标签
|
||||||
})
|
})
|
||||||
const latitude = ref<number>(0) // 纬度
|
const latitude = ref<number>(0) // 纬度
|
||||||
const longitude = ref<number>(0) // 经度
|
const longitude = ref<number>(0) // 经度
|
||||||
|
|||||||
@ -103,9 +103,11 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="flex flex-wrap items-center mt-14rpx">
|
<view class="flex flex-wrap items-center mt-14rpx">
|
||||||
<view
|
<view
|
||||||
class="mr-8rpx bg-[#4C9F44] text-[#fff] px-10rpx leading-34rpx font-400 text-24rpx rounded-4rpx">
|
class="mr-8rpx bg-[#4C9F44] text-[#fff] px-10rpx leading-34rpx font-400 text-24rpx rounded-4rpx"
|
||||||
123</view>
|
v-for="(labelText, index) in item.label" :key="index">
|
||||||
|
{{ labelText }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="flex items-center justify-between mt-18rpx">
|
<view class="flex items-center justify-between mt-18rpx">
|
||||||
|
|||||||
@ -117,6 +117,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 优惠 -->
|
||||||
<view class="mt-52rpx">
|
<view class="mt-52rpx">
|
||||||
<view class="flex justify-between items-center text-30rpx text-[#303133] leading-42rpx">
|
<view class="flex justify-between items-center text-30rpx text-[#303133] leading-42rpx">
|
||||||
<view>优惠</view>
|
<view>优惠</view>
|
||||||
@ -231,7 +232,7 @@
|
|||||||
<!-- 茶艺师信息 -->
|
<!-- 茶艺师信息 -->
|
||||||
<view class="flex items-center bg-white p-20rpx rounded-10rpx mb-20rpx mt-20rpx">
|
<view class="flex items-center bg-white p-20rpx rounded-10rpx mb-20rpx mt-20rpx">
|
||||||
<view class="mr-28rpx relative">
|
<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>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">
|
<view class="font-bold text-[#303133] text-30rpx leading-42rpx mr-14rpx">
|
||||||
@ -405,15 +406,11 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useMessage, useToast } from 'wot-design-uni'
|
import { useMessage, useToast } from 'wot-design-uni'
|
||||||
import { digits } from '@/utils/test'
|
import { router, toPlus, previewImage } from '@/utils/tools'
|
||||||
import { router, toTimes, toPlus, getCurrentDate } from '@/utils/tools'
|
|
||||||
import PriceFormat from '@/components/PriceFormat.vue'
|
import PriceFormat from '@/components/PriceFormat.vue'
|
||||||
import { ReserveServiceCategory, OrderType } from '@/utils/order'
|
import { OrderType } from '@/utils/order'
|
||||||
import { getTeaSpecialistDetails, getTeaTypeList, createTeaSpecialistOrder } from '@/api/tea'
|
import { getTeaTypeList, createTeaSpecialistOrder } from '@/api/tea'
|
||||||
import { getNext7Days} from '@/api/tea-room'
|
import type { ITeaSpecialistFuture7DaysResult, ITeaTypeListResult } from '@/api/types/tea'
|
||||||
import type { ITeaSpecialistDetailsFields, ITeaSpecialistFuture7DaysResult, ITeaTypeListResult } from '@/api/types/tea'
|
|
||||||
import { TeaSpecialistLevelValue } from '@/utils/teaSpecialist'
|
|
||||||
import type { IUserAddressListResult } from '@/api/types/user'
|
|
||||||
import BookingTime from '@/components/BookingTime.vue'
|
import BookingTime from '@/components/BookingTime.vue'
|
||||||
import { CouponType } from '@/utils/coupon'
|
import { CouponType } from '@/utils/coupon'
|
||||||
import { getTeaSpecialistDetail, getTeaSpecialistFeeDetails } from '@/api/tea-specialist'
|
import { getTeaSpecialistDetail, getTeaSpecialistFeeDetails } from '@/api/tea-specialist'
|
||||||
@ -426,10 +423,6 @@
|
|||||||
const isSubmitting = ref(false)
|
const isSubmitting = ref(false)
|
||||||
|
|
||||||
// 服务方式
|
// 服务方式
|
||||||
const serviceType = ref<Array<any>>([
|
|
||||||
{type: 1, name: '到店服务'},
|
|
||||||
{type: 2, name: '上门服务'},
|
|
||||||
])
|
|
||||||
const serviceTypeValue = ref<number>(1)
|
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()
|
Reserve.handleInit()
|
||||||
})
|
})
|
||||||
@ -606,7 +607,10 @@
|
|||||||
* 初始化-获取茶叶列表
|
* 初始化-获取茶叶列表
|
||||||
*/
|
*/
|
||||||
handleInit: async () => {
|
handleInit: async () => {
|
||||||
const tea = await getTeaTypeList()
|
const tea = await getTeaTypeList({
|
||||||
|
team_user_id: id.value,
|
||||||
|
type: 1
|
||||||
|
})
|
||||||
teaList.value = tea as ITeaTypeListResult[]
|
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`)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -26,26 +26,26 @@
|
|||||||
|
|
||||||
// 茶艺师等级对应的icon和文字(这个数组5-1就是对应的等级)
|
// 茶艺师等级对应的icon和文字(这个数组5-1就是对应的等级)
|
||||||
const levelMap = {
|
const levelMap = {
|
||||||
5: {
|
|
||||||
icon: `${OSS}icon/icon_gold_medal.png`,
|
|
||||||
text: '金牌茶艺师'
|
|
||||||
},
|
|
||||||
4: {
|
4: {
|
||||||
icon: `${OSS}icon/icon_senior_medal.png`,
|
icon: `${OSS}icon/icon_gold_medal.png`,
|
||||||
text: '高级茶艺师'
|
text: '云华茶艺师'
|
||||||
},
|
},
|
||||||
3: {
|
3: {
|
||||||
icon: `${OSS}icon/icon_intermediate_medal.png`,
|
icon: `${OSS}icon/icon_senior_medal.png`,
|
||||||
text: '中级茶艺师'
|
text: '竹影茶艺师'
|
||||||
},
|
},
|
||||||
2: {
|
2: {
|
||||||
icon: `${OSS}icon/icon_junior_medal.png`,
|
icon: `${OSS}icon/icon_intermediate_medal.png`,
|
||||||
text: '初级茶艺师'
|
text: '明月茶艺师'
|
||||||
},
|
},
|
||||||
1: {
|
1: {
|
||||||
icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
icon: `${OSS}icon/icon_junior_medal.png`,
|
||||||
text: '茶艺爱好者'
|
text: '清风茶艺师'
|
||||||
}
|
},
|
||||||
|
// 1: {
|
||||||
|
// icon: `${OSS}icon/icon_enthusiast_medal.png`,
|
||||||
|
// text: '茶艺爱好者'
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
<!-- 支付信息 -->
|
<!-- 支付信息 -->
|
||||||
<view class="mt-56rpx text-center">
|
<view class="mt-56rpx text-center">
|
||||||
<view class="text-28rpx leading-40rpx text-#606266">{{ title }}</view>
|
<view class="text-28rpx leading-40rpx text-#606266">{{ title }}</view>
|
||||||
|
<!-- <view class="text-28rpx leading-40rpx text-#606266" v-if="teaPackageTitle">茶艺师套餐-{{ teaPackageTitle }}</view> -->
|
||||||
<view class="mt-24rpx">
|
<view class="mt-24rpx">
|
||||||
<template>
|
<template>
|
||||||
<price-format color="#303133" :first-size="44" :second-size="44" :subscript-size="28" :price="money"></price-format>
|
<price-format color="#303133" :first-size="44" :second-size="44" :subscript-size="28" :price="money"></price-format>
|
||||||
@ -120,6 +121,9 @@
|
|||||||
const reserveTeaSpecialist = ref<boolean>(false)
|
const reserveTeaSpecialist = ref<boolean>(false)
|
||||||
const teaSpecialistOrderAmount = ref<number>(0) // 茶艺师订单金额
|
const teaSpecialistOrderAmount = ref<number>(0) // 茶艺师订单金额
|
||||||
|
|
||||||
|
// 茶艺师套餐标题
|
||||||
|
const teaPackageTitle = ref<string>('')
|
||||||
|
|
||||||
// 防止重复提交
|
// 防止重复提交
|
||||||
const isSubmitting = ref(false)
|
const isSubmitting = ref(false)
|
||||||
|
|
||||||
@ -128,6 +132,9 @@
|
|||||||
orderId.value = Number(args.orderId)
|
orderId.value = Number(args.orderId)
|
||||||
comboId.value = Number(args.cmoboId) || 0
|
comboId.value = Number(args.cmoboId) || 0
|
||||||
|
|
||||||
|
// 茶艺师套餐
|
||||||
|
teaPackageTitle.value = args.teaPackageTitle || ''
|
||||||
|
|
||||||
// 套餐购买
|
// 套餐购买
|
||||||
groupCouponId.value = Number(args.groupCouponId) || 0
|
groupCouponId.value = Number(args.groupCouponId) || 0
|
||||||
isGroupBuying.value = Number(args.isGroupBuying) || 0
|
isGroupBuying.value = Number(args.isGroupBuying) || 0
|
||||||
|
|||||||
@ -86,6 +86,7 @@
|
|||||||
* 选择城市
|
* 选择城市
|
||||||
*/
|
*/
|
||||||
handleChooseCity: (item: any) => {
|
handleChooseCity: (item: any) => {
|
||||||
|
console.log("🚀 ~ item:", item)
|
||||||
const params = {
|
const params = {
|
||||||
// latitude: item.latitude,
|
// latitude: item.latitude,
|
||||||
// longitude: item.longitude,
|
// longitude: item.longitude,
|
||||||
@ -106,7 +107,7 @@
|
|||||||
handleInitDefaultCity: () => {
|
handleInitDefaultCity: () => {
|
||||||
City.handleChooseCity({
|
City.handleChooseCity({
|
||||||
id: 0,
|
id: 0,
|
||||||
city: '嘉兴市'
|
name: city.value || LOCATION_DEFAULT_CITY
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,54 +66,35 @@
|
|||||||
<wd-img :src="`${OSS}images/home/home_image_15.png`" width="690rpx" height="148rpx" mode="scaleToFill" />
|
<wd-img :src="`${OSS}images/home/home_image_15.png`" width="690rpx" height="148rpx" mode="scaleToFill" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mx-30rpx pb-30rpx flex justify-between">
|
<view class="package-row px-30rpx pb-30rpx">
|
||||||
<view class="w-216rpx rounded-20rpx pb-20rpx box-border" style="background: linear-gradient( 180deg, #EAFFF9 0%, #F6F7F9 100%);"
|
<view class="flex flex-wrap justify-between">
|
||||||
@click="router.navigateTo(`/bundle/package/detail`)">
|
<view
|
||||||
<view class="px-10rpx pt-10rpx flex justify-center">
|
v-for="(item, idx) in teaPackageList"
|
||||||
<wd-img width="204rpx" height="124rpx" :src="`${OSS}images/home/home_image_16.png`" radius="16rpx" mode="aspectFill" />
|
:key="item.id || idx"
|
||||||
</view>
|
class="w-216rpx rounded-20rpx pb-20rpx box-border mb-20rpx"
|
||||||
<view class="px-12rpx mt-8rpx">
|
:style="{
|
||||||
<view class="text-28rpx font-bold text-[#303133] line-1">清风套餐</view>
|
background: idx === 0
|
||||||
<view class="text-[#FF5951] mt-6rpx flex items-baseline font-400">
|
? 'linear-gradient( 180deg, #EAFFF9 0%, #F6F7F9 100%)'
|
||||||
<text class="text-28rpx">¥</text>
|
: idx === 1
|
||||||
<text class="text-30rpx">298</text>
|
? 'linear-gradient( 180deg, #FFF3FB 0%, #F6F7F9 100%)'
|
||||||
<text class="text-24rpx">/2小时</text>
|
: 'linear-gradient( 180deg, #FFF9EA 0%, #F6F7F9 100%)'
|
||||||
|
}"
|
||||||
|
@click="router.navigateTo(`/bundle/package/detail?id=${item.id}`)"
|
||||||
|
>
|
||||||
|
<view class="px-10rpx pt-10rpx flex justify-center">
|
||||||
|
<wd-img width="204rpx" height="124rpx" :src="item.img" radius="16rpx" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="px-12rpx mt-8rpx">
|
||||||
</view>
|
<view class="text-28rpx font-bold text-[#303133] line-1">{{ item.title }}</view>
|
||||||
|
<view class="text-[#FF5951] mt-6rpx flex items-baseline font-400">
|
||||||
<view class="w-216rpx rounded-20rpx pb-20rpx box-border" style="background: linear-gradient( 180deg, #FFF3FB 0%, #F6F7F9 100%);">
|
<text class="text-28rpx">¥</text>
|
||||||
<view class="px-10rpx pt-10rpx flex justify-center">
|
<text class="text-30rpx">{{ item.discount_price }}</text>
|
||||||
<wd-img width="204rpx" height="124rpx" :src="`${OSS}images/home/home_image_17.png`" radius="16rpx" mode="aspectFill" />
|
<text class="text-24rpx">/{{ item.hour }}小时</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="px-12rpx mt-8rpx">
|
|
||||||
<view class="text-28rpx font-bold text-[#303133] line-1">明月套餐</view>
|
|
||||||
<view class="text-[#FF5951] mt-6rpx flex items-baseline font-400">
|
|
||||||
<text class="text-28rpx">¥</text>
|
|
||||||
<text class="text-30rpx">598</text>
|
|
||||||
<text class="text-24rpx">/2小时</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="w-216rpx rounded-20rpx pb-20rpx box-border" style="background: linear-gradient( 180deg, #FFF9EA 0%, #F6F7F9 100%);">
|
|
||||||
<view class="px-10rpx pt-10rpx flex justify-center">
|
|
||||||
<wd-img width="204rpx" height="124rpx" :src="`${OSS}images/home/home_image_18.png`" radius="16rpx" mode="aspectFill" />
|
|
||||||
</view>
|
|
||||||
<view class="px-12rpx mt-8rpx">
|
|
||||||
<view class="text-28rpx font-bold text-[#303133] line-1">鹤鸣套餐</view>
|
|
||||||
<view class="text-[#FF5951] mt-6rpx flex items-baseline font-400">
|
|
||||||
<text class="text-28rpx">¥</text>
|
|
||||||
<text class="text-30rpx">998</text>
|
|
||||||
<text class="text-24rpx">/2小时</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="mt-24rpx relative w-690rpx h-224rpx mx-30rpx" @click="router.navigateTo(`/bundle_b/pages/tea-specialist/list`)">
|
|
||||||
<wd-img width="690rpx" height="224rpx" :src="`${OSS}images/home/home_image14.png`" mode="scaleToFill" />
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
@ -194,7 +175,8 @@
|
|||||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||||
import { LOCATION_DENY_TIME_KEY, handleEnsureLocationAuthHooks, LOCATION_DEFAULT_CITY, handleGetLocationCity, LOCATION_CITY_KEY, handleForceGetLocation } from '@/hooks/useLocation'
|
import { LOCATION_DENY_TIME_KEY, handleEnsureLocationAuthHooks, LOCATION_DEFAULT_CITY, handleGetLocationCity, LOCATION_CITY_KEY, handleForceGetLocation } from '@/hooks/useLocation'
|
||||||
import { getHomeBannerList, getHomeCouponPopup, claimIndexCoupon, getWxacode } from '@/api/home'
|
import { getHomeBannerList, getHomeCouponPopup, claimIndexCoupon } from '@/api/home'
|
||||||
|
import { getTeaPackageList } from '@/api/tea-package'
|
||||||
import { getHomeTeaStoreList } from '@/api/tea-room'
|
import { getHomeTeaStoreList } from '@/api/tea-room'
|
||||||
import { useUserStore } from '@/store'
|
import { useUserStore } from '@/store'
|
||||||
import { useToast } from 'wot-design-uni'
|
import { useToast } from 'wot-design-uni'
|
||||||
@ -233,6 +215,9 @@
|
|||||||
let lastLocation = { lat: 0, lng: 0 }
|
let lastLocation = { lat: 0, lng: 0 }
|
||||||
const canLocation = ref<boolean>(false)
|
const canLocation = ref<boolean>(false)
|
||||||
|
|
||||||
|
// 套餐列表
|
||||||
|
const teaPackageList = ref<Array<any>>([])
|
||||||
|
|
||||||
// 显示优惠券弹窗
|
// 显示优惠券弹窗
|
||||||
const showCoupon = ref<boolean>(false)
|
const showCoupon = ref<boolean>(false)
|
||||||
|
|
||||||
@ -355,6 +340,11 @@
|
|||||||
getHomeBannerList().then(res => {
|
getHomeBannerList().then(res => {
|
||||||
swiperList.value = res.list.map(item => item.address)
|
swiperList.value = res.list.map(item => item.address)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 获取套餐列表
|
||||||
|
getTeaPackageList().then(res => {
|
||||||
|
teaPackageList.value = res
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -362,6 +352,7 @@
|
|||||||
*/
|
*/
|
||||||
handleToCity: () => {
|
handleToCity: () => {
|
||||||
uni.$on('locationUpdate', params => {
|
uni.$on('locationUpdate', params => {
|
||||||
|
console.log("🚀 ~ params:", params)
|
||||||
uni.$off('locationUpdate')
|
uni.$off('locationUpdate')
|
||||||
city.value = params.city
|
city.value = params.city
|
||||||
city_id.value = params.id
|
city_id.value = params.id
|
||||||
@ -560,4 +551,19 @@ page {
|
|||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
border-radius: 0 0 16rpx 16rpx;
|
border-radius: 0 0 16rpx 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 套餐一行三列布局样式 */
|
||||||
|
.package-row {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.package-row .flex {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.package-row .w-216rpx {
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -9,18 +9,18 @@ export enum TeaSpecialistLevel {
|
|||||||
|
|
||||||
// 等级名称对应值
|
// 等级名称对应值
|
||||||
export const TeaSpecialistLevelValue = {
|
export const TeaSpecialistLevelValue = {
|
||||||
['金牌茶艺师']: 'gold',
|
['云华茶艺师']: 'gold',
|
||||||
['高级茶艺师']: 'senior',
|
['竹影茶艺师']: 'senior',
|
||||||
['中级茶艺师']: 'intermediate',
|
['明月茶艺师']: 'intermediate',
|
||||||
['初级茶艺师']: 'junior',
|
['清风茶艺师']: 'junior',
|
||||||
// ['茶艺爱好者']: 'enthusiast',
|
// ['茶艺爱好者']: 'enthusiast',
|
||||||
}
|
}
|
||||||
|
|
||||||
// 茶艺师对象结构
|
// 茶艺师对象结构
|
||||||
export const TeaSpecialistLevels = [
|
export const TeaSpecialistLevels = [
|
||||||
{ id: 4, value: 'junior', label: TeaSpecialistLevel.Junior, level: 2 },
|
{ id: 4, value: 'junior', label: TeaSpecialistLevel.Junior, level: 1 },
|
||||||
{ id: 3, value: 'intermediate', label: TeaSpecialistLevel.Intermediate, level: 3 },
|
{ id: 3, value: 'intermediate', label: TeaSpecialistLevel.Intermediate, level: 2 },
|
||||||
{ id: 2, value: 'senior', label: TeaSpecialistLevel.Senior, level: 4 },
|
{ id: 2, value: 'senior', label: TeaSpecialistLevel.Senior, level: 3 },
|
||||||
{ id: 1, value: 'gold', label: TeaSpecialistLevel.Gold, level: 5 },
|
{ id: 1, value: 'gold', label: TeaSpecialistLevel.Gold, level: 4 },
|
||||||
// { id: 5, value: 'enthusiast', label: TeaSpecialistLevel.Enthusiast, level: 1 }
|
// { id: 5, value: 'enthusiast', label: TeaSpecialistLevel.Enthusiast, level: 1 }
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user