完善预定页面
This commit is contained in:
@ -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()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user