完善页面
This commit is contained in:
@ -136,6 +136,7 @@
|
||||
const city = ref<string>('')
|
||||
const keywords = ref<string>('')
|
||||
const list = ref<Array<any>>([])
|
||||
const city_id = ref<number>(0)
|
||||
|
||||
let lastLocation = { lat: 0, lng: 0 }
|
||||
onShow(async () => {
|
||||
@ -152,7 +153,6 @@
|
||||
lastLocation.lat = location.lat
|
||||
lastLocation.lng = location.lng
|
||||
|
||||
console.log("🚀 ~ city.value:", 'xxxxx', city.value)
|
||||
Index.handleResetSearch()
|
||||
}
|
||||
}
|
||||
@ -172,6 +172,7 @@
|
||||
city.value = location.city
|
||||
latitude.value = location.latitude
|
||||
longitude.value = location.longitude
|
||||
console.log("🚀 ~ latitude.value:", latitude.value, longitude.value)
|
||||
|
||||
Index.handleResetSearch()
|
||||
})
|
||||
@ -192,10 +193,11 @@
|
||||
latitude: latitude.value,
|
||||
longitude: longitude.value,
|
||||
search: keywords.value,
|
||||
user_id: userId
|
||||
user_id: userId,
|
||||
city_area_id: city_id.value || 0
|
||||
}
|
||||
uni.showLoading({ title: '加载中...' })
|
||||
|
||||
uni.showLoading({ title: '加载中...' })
|
||||
try {
|
||||
getHomeTeaStoreList(filter).then( res => {
|
||||
uni.hideLoading()
|
||||
@ -227,12 +229,11 @@
|
||||
*/
|
||||
handleToCity: () => {
|
||||
uni.$on('locationUpdate', params => {
|
||||
console.log("🚀 ~ params:", params)
|
||||
uni.$off('locationUpdate')
|
||||
|
||||
city.value = params.city
|
||||
latitude.value = params.latitude
|
||||
longitude.value = params.longitude
|
||||
city_id.value = params.id
|
||||
// latitude.value = params.latitude
|
||||
// longitude.value = params.longitude
|
||||
Index.handleResetSearch()
|
||||
})
|
||||
router.navigateTo(`/pages/city/city?lat=${latitude.value}&lng=${longitude.value}`)
|
||||
|
||||
Reference in New Issue
Block a user