如果没有经纬度则给到默认的经纬度

This commit is contained in:
wangxiaowei
2025-12-26 13:25:34 +08:00
parent 434fc0f041
commit dc635de2e9
10 changed files with 56 additions and 41 deletions

View File

@ -9,7 +9,15 @@
<template>
<view>
<view>
<navbar title="预约茶室" fixed>
<navbar fixed layoutLeft hideLeftIcon>
<template #left>
<view class="h-48rpx flex items-center" @click="Room.handleBack">
<view class="mt-4rpx">
<wd-icon name="thin-arrow-left" size="30rpx" color="#121212" ></wd-icon>
</view>
<view class="text-[#303133] text-36rpx ml-24rpx leading-48rpx">预约茶室</view>
</view>
</template>
<template #right>
<view class="flex items-center ml-114rpx right-slot">
<!-- <view class="mr-16rpx flex items-center" @click="Room.handleCollect">
@ -248,8 +256,8 @@
const res = await getTeaRoomDetail({
id: teaRoomId.value,
latitude: uni.getStorageSync('latitude'),
longitude: uni.getStorageSync('longitude'),
latitude: uni.getStorageSync('latitude') || import.meta.env.VITE_DEFAULT_LATITUDE,
longitude: uni.getStorageSync('longitude') || import.meta.env.VITE_DEFAULT_LONGITUDE,
user_id: userInfo.value.id || 0
})
teaRoom.value = res.details
@ -373,6 +381,15 @@
handleToRecharge: () => {
// router.navigateTo(`/bundle/store-recharge/store-recharge?id=${teaRoom.value.id}&storeName=${teaRoom.value.name}`)
router.navigateTo('/bundle/wallet/recharge')
},
/**
* 因为会从付款成功提示页跳转但是返回时页面没有栈所以需要switch方法跳转
*/
handleBack: () => {
router.navigateBack().catch(err => {
router.switchTab('/pages/index/index')
})
}
}
</script>