修复设备不在线时,地图页面提示显示问题

This commit is contained in:
HycJack
2026-05-26 03:27:42 +08:00
parent 9900f43154
commit 555a2ddc16

View File

@@ -132,7 +132,7 @@ export default function Location() {
)
useDidShow(() => {
void loadLocation()
void loadLocation(true)
})
const loadLocation = async (showToast = false, nextMode?: TrajectoryMode) => {
@@ -243,6 +243,10 @@ export default function Location() {
})
}
} catch (error: any) {
if (showToast) {
Taro.hideLoading()
}
setLoading(false)
console.error('[location] load failed:', error)
Taro.showToast({
title: error?.message || '位置更新失败',