完善预定页面

This commit is contained in:
wangxiaowei
2025-10-25 10:34:55 +08:00
parent b2f658f3c0
commit 68b075ce59
13 changed files with 407 additions and 61 deletions

View File

@ -179,6 +179,10 @@
}
const latitude = ref<number>(import.meta.env.VITE_DEFAULT_LATITUDE) // 纬度
const longitude = ref<number>(import.meta.env.VITE_DEFAULT_LONGITUDE) // 经度
// 存储经纬度
uni.setStorageSync('latitude', latitude.value)
uni.setStorageSync('longitude', longitude.value)
const defaultCity = ref<string>(import.meta.env.VITE_DEFAULT_ADDRESS) // 默认城市
const list = ref<Array<any>>([]) // 茶艺师列表
const teaSpecialistName = ref<string>('') // 茶艺师名称
@ -186,10 +190,16 @@
const cityValue = ref<string>('')
onLoad(async () => {
// 授权获取地址
await wxGetLocation((res) => {
latitude.value = res.latitude
longitude.value = res.longitude
// 授权后存储经纬度
uni.setStorageSync('latitude', latitude.value)
uni.setStorageSync('longitude', longitude.value)
Index.handleSearch()
})