完善茶艺师套餐功能
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
<!-- 支付信息 -->
|
||||
<view class="mt-56rpx text-center">
|
||||
<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">
|
||||
<template>
|
||||
<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 teaSpecialistOrderAmount = ref<number>(0) // 茶艺师订单金额
|
||||
|
||||
// 茶艺师套餐标题
|
||||
const teaPackageTitle = ref<string>('')
|
||||
|
||||
// 防止重复提交
|
||||
const isSubmitting = ref(false)
|
||||
|
||||
@ -128,6 +132,9 @@
|
||||
orderId.value = Number(args.orderId)
|
||||
comboId.value = Number(args.cmoboId) || 0
|
||||
|
||||
// 茶艺师套餐
|
||||
teaPackageTitle.value = args.teaPackageTitle || ''
|
||||
|
||||
// 套餐购买
|
||||
groupCouponId.value = Number(args.groupCouponId) || 0
|
||||
isGroupBuying.value = Number(args.isGroupBuying) || 0
|
||||
|
||||
@ -86,6 +86,7 @@
|
||||
* 选择城市
|
||||
*/
|
||||
handleChooseCity: (item: any) => {
|
||||
console.log("🚀 ~ item:", item)
|
||||
const params = {
|
||||
// latitude: item.latitude,
|
||||
// longitude: item.longitude,
|
||||
@ -106,7 +107,7 @@
|
||||
handleInitDefaultCity: () => {
|
||||
City.handleChooseCity({
|
||||
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" />
|
||||
</view>
|
||||
|
||||
<view class="mx-30rpx pb-30rpx flex justify-between">
|
||||
<view class="w-216rpx rounded-20rpx pb-20rpx box-border" style="background: linear-gradient( 180deg, #EAFFF9 0%, #F6F7F9 100%);"
|
||||
@click="router.navigateTo(`/bundle/package/detail`)">
|
||||
<view class="px-10rpx pt-10rpx flex justify-center">
|
||||
<wd-img width="204rpx" height="124rpx" :src="`${OSS}images/home/home_image_16.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">298</text>
|
||||
<text class="text-24rpx">/2小时</text>
|
||||
<view class="package-row px-30rpx pb-30rpx">
|
||||
<view class="flex flex-wrap justify-between">
|
||||
<view
|
||||
v-for="(item, idx) in teaPackageList"
|
||||
:key="item.id || idx"
|
||||
class="w-216rpx rounded-20rpx pb-20rpx box-border mb-20rpx"
|
||||
:style="{
|
||||
background: idx === 0
|
||||
? 'linear-gradient( 180deg, #EAFFF9 0%, #F6F7F9 100%)'
|
||||
: idx === 1
|
||||
? 'linear-gradient( 180deg, #FFF3FB 0%, #F6F7F9 100%)'
|
||||
: '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="w-216rpx rounded-20rpx pb-20rpx box-border" style="background: linear-gradient( 180deg, #FFF3FB 0%, #F6F7F9 100%);">
|
||||
<view class="px-10rpx pt-10rpx flex justify-center">
|
||||
<wd-img width="204rpx" height="124rpx" :src="`${OSS}images/home/home_image_17.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">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 class="px-12rpx mt-8rpx">
|
||||
<view class="text-28rpx font-bold text-[#303133] line-1">{{ item.title }}</view>
|
||||
<view class="text-[#FF5951] mt-6rpx flex items-baseline font-400">
|
||||
<text class="text-28rpx">¥</text>
|
||||
<text class="text-30rpx">{{ item.discount_price }}</text>
|
||||
<text class="text-24rpx">/{{ item.hour }}小时</text>
|
||||
</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>
|
||||
@ -194,7 +175,8 @@
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
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 { 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 { useUserStore } from '@/store'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
@ -233,6 +215,9 @@
|
||||
let lastLocation = { lat: 0, lng: 0 }
|
||||
const canLocation = ref<boolean>(false)
|
||||
|
||||
// 套餐列表
|
||||
const teaPackageList = ref<Array<any>>([])
|
||||
|
||||
// 显示优惠券弹窗
|
||||
const showCoupon = ref<boolean>(false)
|
||||
|
||||
@ -355,6 +340,11 @@
|
||||
getHomeBannerList().then(res => {
|
||||
swiperList.value = res.list.map(item => item.address)
|
||||
})
|
||||
|
||||
// 获取套餐列表
|
||||
getTeaPackageList().then(res => {
|
||||
teaPackageList.value = res
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@ -362,6 +352,7 @@
|
||||
*/
|
||||
handleToCity: () => {
|
||||
uni.$on('locationUpdate', params => {
|
||||
console.log("🚀 ~ params:", params)
|
||||
uni.$off('locationUpdate')
|
||||
city.value = params.city
|
||||
city_id.value = params.id
|
||||
@ -560,4 +551,19 @@ page {
|
||||
line-height: 44rpx;
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user