fix:修复bug
This commit is contained in:
@@ -74,7 +74,7 @@ import {
|
||||
} from '../../config/api/device.js'
|
||||
import { useI18n } from '../../utils/i18n.js'
|
||||
|
||||
const { t: $t } = useI18n()
|
||||
const { t } = useI18n()
|
||||
|
||||
const positionInfo = ref({})
|
||||
const positionId = ref('')
|
||||
@@ -112,7 +112,7 @@ const { t: $t } = useI18n()
|
||||
const loadPositionDetail = async () => {
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: $t('common.loading')
|
||||
title: t('common.loading')
|
||||
})
|
||||
|
||||
// 获取用户位置用于查询附近设备
|
||||
@@ -147,7 +147,7 @@ const { t: $t } = useI18n()
|
||||
positionInfo.value = position
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: $t('location.notExist'),
|
||||
title: t('location.notExist'),
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -155,7 +155,7 @@ const { t: $t } = useI18n()
|
||||
} catch (e) {
|
||||
console.error('加载设备详情失败:', e)
|
||||
uni.showToast({
|
||||
title: $t('common.loadFailed'),
|
||||
title: t('common.loadFailed'),
|
||||
icon: 'none'
|
||||
})
|
||||
} finally {
|
||||
@@ -166,7 +166,7 @@ const { t: $t } = useI18n()
|
||||
const navigateToPosition = () => {
|
||||
if (!positionInfo.value.latitude || !positionInfo.value.longitude) {
|
||||
uni.showToast({
|
||||
title: $t('location.coordinateError'),
|
||||
title: t('location.coordinateError'),
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
@@ -181,7 +181,7 @@ const { t: $t } = useI18n()
|
||||
longitude < -180 || longitude > 180 ||
|
||||
(latitude === 0 && longitude === 0)) {
|
||||
uni.showToast({
|
||||
title: $t('location.coordinateError'),
|
||||
title: t('location.coordinateError'),
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user