1
This commit is contained in:
@@ -642,7 +642,12 @@ function Index() {
|
||||
try {
|
||||
const location = await getCurrentLocation()
|
||||
setCurrentLocation([location.latitude, location.longitude])
|
||||
|
||||
// 使用 userStore 中的统一位置更新方法
|
||||
await updateUserInfo({ latitude: location.latitude, longitude: location.longitude })
|
||||
|
||||
// 位置更新后,重新获取详情页数据(因为距离等信息可能发生变化)
|
||||
await fetchDetail()
|
||||
} catch (error) {
|
||||
console.error('用户位置更新失败', error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user