修复设备不在线时,地图页面提示显示问题
This commit is contained in:
@@ -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 || '位置更新失败',
|
||||
|
||||
Reference in New Issue
Block a user