完善茶艺师套餐功能优化
This commit is contained in:
@ -15,8 +15,8 @@
|
||||
<view class="text-30rpx font-bold text-[#303133]">茶艺师</view>
|
||||
<view class="text-24rpx text-[#818CA9] mt-12rpx mb-32rpx font-500">匹配心动茶艺师</view>
|
||||
|
||||
<view class="flex flex-wrap justify-between">
|
||||
<view class="w-216rpx mb-30rpx relative" v-for="(item, index) in list" :key="index"
|
||||
<view class="grid grid-cols-3 gap-y-20rpx gap-x-20rpx justify-items-center">
|
||||
<view class="w-216rpx relative" v-for="(item, index) in list" :key="index"
|
||||
@click="TeaSpecialist.handleSelect(index)">
|
||||
<view class="relative w-216rpx h-216rpx rounded-16rpx overflow-hidden">
|
||||
<wd-img :src="item.image" width="216rpx" height="216rpx" mode="aspectFill"></wd-img>
|
||||
@ -40,7 +40,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-center mt-10rpx">
|
||||
<view class="flex justify-center mt-40rpx">
|
||||
<view class="flex items-center justify-center bg-[#F6F7F8] rounded-34rpx h-100rpx w-320rpx"
|
||||
@click="TeaSpecialist.handleMore">
|
||||
<wd-img :src="`${OSS}icon/icon_more.png`" width="36rpx" height="36rpx"></wd-img>
|
||||
@ -62,7 +62,7 @@
|
||||
<view class="flex items-center text-24rpx text-[#909399] mb-16rpx">
|
||||
<wd-img :src="`${OSS}icon/icon_store_cert.png`" width="36rpx" height="36rpx"
|
||||
class="mr-8rpx"></wd-img>
|
||||
<text>商家认证</text>
|
||||
<text @click="TeaSpecialist.handlePreviewInfo">{{ info.company_abv }}</text>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<wd-rate v-model="info.sold" readonly active-color="#FF5951" allow-half
|
||||
@ -137,9 +137,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { inject, ref, computed } from 'vue'
|
||||
import { router } from '@/utils/tools'
|
||||
import { router, previewImage } from '@/utils/tools'
|
||||
import { getTeaSpecialist, getTeaSpecialistDetail } from '@/api/tea-specialist'
|
||||
import type { ITeaSpecialistResult } from '@/api/types/tea-specialist'
|
||||
import { toast } from '@/utils/toast'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
|
||||
@ -164,10 +165,16 @@ const info = ref({
|
||||
mileage_price: 0, // 车马费
|
||||
server_type: 0, // 服务方式 1到店 2上门 3两者都有
|
||||
label: [], // 专属圈子标签
|
||||
company_abv: '', // 公司简称
|
||||
company_url: '', // 图片链接
|
||||
company_status: 0, // 是否有公司信息
|
||||
})
|
||||
|
||||
const serviceType = ref<number>(1) // 服务方式,默认为到店服务
|
||||
|
||||
onLoad((args) => {
|
||||
serviceType.value = args.serviceType || 1 // 默认到店服务
|
||||
|
||||
onLoad(() => {
|
||||
TeaSpecialist.handleGetTeaSpecialistList()
|
||||
})
|
||||
|
||||
@ -186,6 +193,7 @@ const TeaSpecialist = {
|
||||
latitude: storage.latitude || import.meta.env.VITE_DEFAULT_LATITUDE,
|
||||
longitude: storage.longitude || import.meta.env.VITE_DEFAULT_LONGITUDE,
|
||||
level: uni.getStorageSync('teaPackageType'),
|
||||
server_type: serviceType.value, // 1到店服务 2上门服务
|
||||
}
|
||||
try {
|
||||
const res = await getTeaSpecialist(filter)
|
||||
@ -241,6 +249,17 @@ const TeaSpecialist = {
|
||||
handleNext: () => {
|
||||
console.log("🚀 ~ info.value:", info.value)
|
||||
router.navigateTo(`/bundle/package/reserve?id=${info.value.team_user_id}`)
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看商家信息
|
||||
*/
|
||||
handlePreviewInfo: () => {
|
||||
if (info.value.company_status) {
|
||||
previewImage(info.value.company_url, [info.value.company_url])
|
||||
} else {
|
||||
toast.info('暂无商家信息')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user