修复bug

This commit is contained in:
2026-05-11 22:22:18 +08:00
parent 03bc46df29
commit 7d891c9f7b
22 changed files with 2198 additions and 181 deletions
+7 -2
View File
@@ -10,6 +10,7 @@ import * as R from 'ramda'
import {EventEnum} from "@/constant/enums";
import {dayjs} from '@/plugin'
import {useConfigStore} from "@/store";
import {i18n} from "@/locale";
export const useUserStore = defineStore(
'user',
@@ -173,9 +174,13 @@ export const useUserStore = defineStore(
} catch (e) {
}
}
const {locale} = useI18n()
function getCityName(latitude: number, longitude: number) {
const url = `https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=${Config.googleMapKey}&language=${locale.value === 'zh-Hans' ? 'zh-CN' : locale.value}`;
const currentLocale =
typeof i18n.global.locale === 'string'
? i18n.global.locale
: i18n.global.locale.value
const language = currentLocale === 'zh-Hans' ? 'zh-CN' : currentLocale
const url = `https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=${Config.googleMapKey}&language=${language}`;
uni.request({
url,