完善功能

This commit is contained in:
wangxiaowei
2026-05-04 16:54:47 +08:00
parent dcbba2c79d
commit 97759cdbad
9 changed files with 390 additions and 143 deletions

View File

@ -202,7 +202,7 @@
</view>
<!-- 茶艺师订单 -->
<view class="bg-white rounded-16rpx mx-30rpx mt-28rpx pb-34rpx">
<view class="bg-white rounded-16rpx mx-30rpx mt-28rpx pb-34rpx" v-if="setting.status == 1">
<view class="px-30rpx pt-30rpx py-24rpx">茶艺师订单</view>
<view class="flex relative px-30rpx">
<view v-for="(item, index) in teaReserveMenuList" :key="index">
@ -270,6 +270,7 @@
import { useUserStore } from '@/store'
import { getUserInfo, getMyCoupon, claimMyCoupon, getUserMember, getConfig } from '@/api/user'
import type { IUserResult } from '@/api/types/user'
import { getSetting } from '@/api/tea-specialist'
const OSS = inject('OSS')
const navbarHeight = inject('navbarHeight')
@ -337,6 +338,9 @@
// 过期时间
const expireTime = ref<string>('')
// 获取设置
const setting = ref<any>({})
onShow(() => {
const userStore = useUserStore()
isLogin.value = userStore.isLoggedIn
@ -402,6 +406,10 @@
sheetMenu.value = [{ name: serviceMobile }]
}
})
getSetting().then(res => {
setting.value = res
})
},
/**

View File

@ -26,7 +26,7 @@
<view class="tabs">
<wd-tabs v-model="tab" swipeable slidable="always" @change="Reserve.handleChangeTab" :lazy="false">
<wd-tab title="茶室预约"></wd-tab>
<wd-tab title="茶艺师预约"></wd-tab>
<wd-tab title="茶艺师预约" v-if="setting.status == 1"></wd-tab>
</wd-tabs>
</view>
</view>
@ -57,6 +57,7 @@
import { router } from '@/utils/tools'
import { getTeaRoomOrderList } from '@/api/tea-room'
import { getTeaSpecialistOrderList } from '@/api/teaSpecialist-order'
import { getSetting } from '@/api/tea-specialist'
const OSS = inject('OSS')
const navbarHeight = Number(inject('navbarHeight')) + 42 + 14 // 42为tabs的高度 14是边距值
@ -65,6 +66,9 @@
const tab = ref<number>(0)
const reserveType = ref<number>(0) // 0:茶室预约 1:茶艺师预约
// 获取设置
const setting = ref<any>({})
// mescroll
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
const downOption = {
@ -96,6 +100,10 @@
list.value = []
getMescroll().resetUpScroll()
})
getSetting().then(res => {
setting.value = res
})
})
onUnload(() => {