This commit is contained in:
张成
2025-09-10 21:43:36 +08:00
parent d38baa9c5b
commit 5fdee20d45
12 changed files with 281 additions and 152 deletions

View File

@@ -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)
}