完善页面

This commit is contained in:
wangxiaowei
2025-12-26 14:46:30 +08:00
parent 54a850fd66
commit f8d8c29dc3
18 changed files with 77 additions and 36 deletions

View File

@ -9,7 +9,7 @@ export interface IPrePayParams {
pay_way: number pay_way: number
order_source: number order_source: number
order_type: number order_type: number
store_id: number store_id?: number
} }
export function prePay(data: IPrePayParams) { export function prePay(data: IPrePayParams) {

View File

@ -50,6 +50,7 @@ export interface IHomeTeaStoreListParams {
search: string search: string
latitude: number latitude: number
longitude: number longitude: number
city_area_id: number
} }
export function getHomeTeaStoreList(data: IHomeTeaStoreListParams) { export function getHomeTeaStoreList(data: IHomeTeaStoreListParams) {

View File

@ -133,7 +133,10 @@ export interface ITeaSpecialistOrderDetailsResult {
start_time: string start_time: string
end_time: string end_time: string
renew_price: number renew_price: number
} },
is_lockpwd?: number,
gate_key?: string,
room_key?: string
} }
/** /**

View File

@ -91,14 +91,14 @@
uni.scanCode({ uni.scanCode({
success: async (res) => { success: async (res) => {
console.log("🚀 ~ res:", res) console.log("🚀 ~ res:", res)
if(res.rawData) { if(res.result) {
code.value = res.rawData code.value = res.result
uni.showLoading({ title: '兑换中...' }) uni.showLoading({ title: '兑换中...' })
try { try {
const params = { const params = {
store_id: storeId.value, store_id: storeId.value,
code: res.rawData.replace(/\s+/g, ''), code: res.result.trim(),
type: 1 type: 2
} }
await checkDouyinCoupon(params) await checkDouyinCoupon(params)

View File

@ -34,7 +34,7 @@
<view class="content mx-30rpx mt-34rpx"> <view class="content mx-30rpx mt-34rpx">
<mescroll-body ref="mescrollItem" @init="mescrollInit" @down="downCallback" @up="OrderList.upCallback" :down="downOption" :up="upOption"> <mescroll-body ref="mescrollItem" @init="mescrollInit" @down="downCallback" @up="OrderList.upCallback" :down="downOption" :up="upOption">
<view class="mb-20rpx" v-for="(item, index) in list" :key="index"> <view class="mb-20rpx" v-for="(item, index) in list" :key="index">
<combo-card :type="OrderSource.Combo" :order="item"></combo-card> <combo-card :type="OrderSource.Combo" :order="item" @refresh="OrderList.handleResetSearch"></combo-card>
</view> </view>
</mescroll-body> </mescroll-body>
</view> </view>
@ -79,6 +79,16 @@
// tab // tab
const tab = ref<string>('all') const tab = ref<string>('all')
const canReset = ref<boolean>(false) // 避免onShow重复加载
onShow(() => {
if (canReset.value) {
list.value = []
getMescroll().resetUpScroll();
}
canReset.value = true
})
onLoad(() => { onLoad(() => {
uni.$on('refreshComboOrderList', () => { uni.$on('refreshComboOrderList', () => {
list.value = [] list.value = []

View File

@ -12,7 +12,7 @@
<wd-navbar safeAreaInsetTop custom-class='!bg-[#F6F7F8]' :bordered="false" placeholder> <wd-navbar safeAreaInsetTop custom-class='!bg-[#F6F7F8]' :bordered="false" placeholder>
<template #left> <template #left>
<view class="h-48rpx flex items-center"> <view class="h-48rpx flex items-center">
<view class="mt-4rpx" @click="router.navigateBack()"> <view class="mt-4rpx" @click="OrderList.handleBack()">
<wd-icon name="thin-arrow-left" size="30rpx"></wd-icon> <wd-icon name="thin-arrow-left" size="30rpx"></wd-icon>
</view> </view>
<view class="search-box"> <view class="search-box">
@ -129,6 +129,15 @@
handleSearch: () => { handleSearch: () => {
list.value = [] list.value = []
getMescroll().resetUpScroll(); getMescroll().resetUpScroll();
},
/**
* 因为会从页面分享页跳转但是返回时页面没有栈所以需要switch方法跳转
*/
handleBack: () => {
router.navigateBack().catch(err => {
router.switchTab('/pages/my/my')
})
} }
} }
</script> </script>

View File

@ -1,5 +1,6 @@
<!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page --> <!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page -->
<route lang="jsonc" type="page">{ <route lang="jsonc" type="page">{
"needLogin": true,
"layout": "tabbar", "layout": "tabbar",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"

View File

@ -1,5 +1,6 @@
<!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page --> <!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page -->
<route lang="jsonc" type="page">{ <route lang="jsonc" type="page">{
"needLogin": true,
"layout": "tabbar", "layout": "tabbar",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"

View File

@ -160,7 +160,7 @@
</template> </template>
</view> </view>
<view class="mt-4rpx"> <view class="mt-4rpx">
<wd-icon name="chevron-right" size="22px" color="#909399"></wd-icon> <wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
</view> </view>
</view> </view>
</view> </view>
@ -181,7 +181,7 @@
</template> </template>
</view> </view>
<view class="mt-4rpx"> <view class="mt-4rpx">
<wd-icon name="chevron-right" size="22px" color="#909399"></wd-icon> <wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
</view> </view>
</view> </view>
</view> </view>

View File

@ -59,11 +59,11 @@
</view> </view>
<view> <view>
<view class="text-30rpx leading-42rpx text-[#303133]">茶室预定</view> <view class="text-30rpx leading-42rpx text-[#303133]">茶室预定</view>
<view class="text-28rpx leading-30rpx text-[#606266] mt-14rpx">预定茶室享受折优惠</view> <view class="text-28rpx leading-30rpx text-[#606266] mt-14rpx">预定茶室享受折优惠</view>
</view> </view>
</view> </view>
<view class="flex items-center mt-74rpx"> <!-- <view class="flex items-center mt-74rpx">
<view class="mr-26rpx"> <view class="mr-26rpx">
<wd-img width="88rpx" height="88rpx" :src="`${OSS}images/vip_benefits/vip_benefits_image4.png`"></wd-img> <wd-img width="88rpx" height="88rpx" :src="`${OSS}images/vip_benefits/vip_benefits_image4.png`"></wd-img>
</view> </view>
@ -97,12 +97,12 @@
<view class="text-28rpx leading-40rpx text-[#606266] mt-14rpx">.尊享20个VIP名额价值7980元</view> <view class="text-28rpx leading-40rpx text-[#606266] mt-14rpx">.尊享20个VIP名额价值7980元</view>
<view class="text-28rpx leading-42rpx text-[#606266] mt-14rpx">.下级VIP消费金额5%永久提成构建持续收益管道</view> <view class="text-28rpx leading-42rpx text-[#606266] mt-14rpx">.下级VIP消费金额5%永久提成构建持续收益管道</view>
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
<view class="btn text-center leading-108rpx mx-auto mt-116rpx" @click="benefits.handledToBuyVip" v-if="currentVipType === 'normal'"> <view class="btn text-center leading-108rpx mx-auto mt-116rpx" @click="benefits.handledToBuyVip" v-if="currentVipType === 'normal'">
立即成为会员 499/ 立即成为会员 9.9/
</view> </view>
</view> </view>
</view> </view>

View File

@ -16,7 +16,7 @@
<view class="mt-24rpx mx-30rpx"> <view class="mt-24rpx mx-30rpx">
<view class="text-center"> <view class="text-center">
<view class="text-48rpx leading-66rpx text-[#303133]">499.00</view> <view class="text-48rpx leading-66rpx text-[#303133]">9.9</view>
<view class="mt-20rpx text-28rpx leading-40rpx text-[#9CA3AF]">开通会员解锁更多精彩内容</view> <view class="mt-20rpx text-28rpx leading-40rpx text-[#9CA3AF]">开通会员解锁更多精彩内容</view>
</view> </view>

View File

@ -2,8 +2,8 @@
<template> <template>
<wd-navbar safeAreaInsetTop :bordered="false" :custom-class="customClass" :fixed="fixed" :placeholder="fixed" :zIndex="zIndex"> <wd-navbar safeAreaInsetTop :bordered="false" :custom-class="customClass" :fixed="fixed" :placeholder="fixed" :zIndex="zIndex">
<template #left> <template #left>
<view class="h-48rpx flex items-center" @click="Navbar.back"> <view class="h-48rpx flex items-center" >
<view class="mt-4rpx"> <view class="mt-4rpx" v-if="!hideLeftIcon" @click="Navbar.back">
<wd-icon name="thin-arrow-left" size="30rpx" :color="iconLeftColor" ></wd-icon> <wd-icon name="thin-arrow-left" size="30rpx" :color="iconLeftColor" ></wd-icon>
</view> </view>
<view class="text-[#303133] text-36rpx ml-24rpx leading-48rpx" v-if="!layoutLeft">{{ title }}</view> <view class="text-[#303133] text-36rpx ml-24rpx leading-48rpx" v-if="!layoutLeft">{{ title }}</view>
@ -73,6 +73,11 @@
iconLeftColor: { iconLeftColor: {
type: String, type: String,
default: '#121212' default: '#121212'
},
hideLeftIcon: {
type: Boolean,
default: false
} }
}) })

View File

@ -261,6 +261,8 @@
// 取消订单弹窗 // 取消订单弹窗
const message = useMessage('wd-message-box-slot') const message = useMessage('wd-message-box-slot')
const emit = defineEmits(['refresh'])
const ComboCard = { const ComboCard = {
/** /**
* 跳转到对对应室的详情页 * 跳转到对对应室的详情页
@ -291,8 +293,9 @@
case OrderSource.Combo: case OrderSource.Combo:
orderType = PayOrderType.ComboRefund orderType = PayOrderType.ComboRefund
let res = await handleRefundOrderHooks(order.id, orderType) let res = await handleRefundOrderHooks(order.id, orderType)
console.log("🚀 ~ res:", res)
if (res) { if (res) {
uni.$emit('refreshComboOrderList') emit('refresh')
} }
// TODO 这里调用删除直营订单的接口 // TODO 这里调用删除直营订单的接口
break; break;

View File

@ -96,14 +96,15 @@
*/ */
handleChooseCity: (item: any) => { handleChooseCity: (item: any) => {
const params = { const params = {
latitude: item.latitude, // latitude: item.latitude,
longitude: item.longitude, // longitude: item.longitude,
id: item.id,
city: item.name city: item.name
} }
uni.$emit('locationUpdate', params) uni.$emit('locationUpdate', params)
uni.setStorageSync(LOCATION_LAT_KEY, item.latitude) // uni.setStorageSync(LOCATION_LAT_KEY, item.latitude)
uni.setStorageSync(LOCATION_LNG_KEY, item.longitude) // uni.setStorageSync(LOCATION_LNG_KEY, item.longitude)
uni.setStorageSync(LOCATION_CITY_KEY, item.name) uni.setStorageSync(LOCATION_CITY_KEY, item.name)
router.navigateBack() router.navigateBack()
} }

View File

@ -136,6 +136,7 @@
const city = ref<string>('') const city = ref<string>('')
const keywords = ref<string>('') const keywords = ref<string>('')
const list = ref<Array<any>>([]) const list = ref<Array<any>>([])
const city_id = ref<number>(0)
let lastLocation = { lat: 0, lng: 0 } let lastLocation = { lat: 0, lng: 0 }
onShow(async () => { onShow(async () => {
@ -152,7 +153,6 @@
lastLocation.lat = location.lat lastLocation.lat = location.lat
lastLocation.lng = location.lng lastLocation.lng = location.lng
console.log("🚀 ~ city.value:", 'xxxxx', city.value)
Index.handleResetSearch() Index.handleResetSearch()
} }
} }
@ -172,6 +172,7 @@
city.value = location.city city.value = location.city
latitude.value = location.latitude latitude.value = location.latitude
longitude.value = location.longitude longitude.value = location.longitude
console.log("🚀 ~ latitude.value:", latitude.value, longitude.value)
Index.handleResetSearch() Index.handleResetSearch()
}) })
@ -192,10 +193,11 @@
latitude: latitude.value, latitude: latitude.value,
longitude: longitude.value, longitude: longitude.value,
search: keywords.value, search: keywords.value,
user_id: userId user_id: userId,
city_area_id: city_id.value || 0
} }
uni.showLoading({ title: '加载中...' })
uni.showLoading({ title: '加载中...' })
try { try {
getHomeTeaStoreList(filter).then( res => { getHomeTeaStoreList(filter).then( res => {
uni.hideLoading() uni.hideLoading()
@ -227,12 +229,11 @@
*/ */
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
latitude.value = params.latitude city_id.value = params.id
longitude.value = params.longitude // latitude.value = params.latitude
// longitude.value = params.longitude
Index.handleResetSearch() Index.handleResetSearch()
}) })
router.navigateTo(`/pages/city/city?lat=${latitude.value}&lng=${longitude.value}`) router.navigateTo(`/pages/city/city?lat=${latitude.value}&lng=${longitude.value}`)

View File

@ -131,14 +131,13 @@
} }
}, },
// 手机登录
/** /**
* 测试-账号登录 * 测试-账号登录
*/ */
// handleMobileLogin: async () => { // handleMobileLogin: async () => {
// const userStore = useUserStore() // const userStore = useUserStore()
// console.log("🚀 ~ userStore:", userStore) // console.log("🚀 ~ userStore:", userStore)
// const res = await userStore.mobileLogin('18868040087', 1, 2) // const res = await userStore.mobileLogin('15005837859', 1, 2)
// if (res) { // if (res) {
// uni.setStorageSync('latitude', '30.74744') // uni.setStorageSync('latitude', '30.74744')
// uni.setStorageSync('longitude', '120.78483') // uni.setStorageSync('longitude', '120.78483')

View File

@ -365,7 +365,7 @@
// 获取会员过期时间 // 获取会员过期时间
getUserMember().then(res => { getUserMember().then(res => {
expireTime.value = res.data.expiration_time expireTime.value = res?.data?.expiration_time
}) })
}, },
@ -394,7 +394,7 @@
handleShowService: () => { handleShowService: () => {
showServiceMobile.value = true showServiceMobile.value = true
sheetMenu.value = [ sheetMenu.value = [
{ name: '400-800-8888' }, { name: '13000000000' },
] ]
}, },

View File

@ -42,7 +42,14 @@
// 是否是团购套餐 // 是否是团购套餐
const isGroupBuying = ref<number>(0) const isGroupBuying = ref<number>(0)
const storeId = ref<number>(0) // 店铺ID
const storeType = ref<number>(0) // 1. 直营 2. 加盟
onLoad((args) => { onLoad((args) => {
storeId.value = Number(args.storeId) || 0
storeType.value = Number(args.storeType) || 0
console.log("🚀 ~ 456 storeId:", storeId.value, storeType.value)
type.value = args.type || '' type.value = args.type || ''
isGroupBuying.value = Number(args.isGroupBuying) || 0 isGroupBuying.value = Number(args.isGroupBuying) || 0
}) })
@ -53,7 +60,7 @@
*/ */
handleRoomSeeOrder: () => { handleRoomSeeOrder: () => {
if (isGroupBuying.value) { if (isGroupBuying.value) {
router.navigateTo('/bundle/order/platform/order-list') router.reLaunch( `/bundle/tea-room/room?id=${storeId.value}&type=${storeType.value}`)
} else { } else {
router.navigateTo('/bundle/order/tea-room/order-list') router.navigateTo('/bundle/order/tea-room/order-list')
} }