From ae1b411fcb54f794646b32b29c47cb380163f95e Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 17 二月 2025 14:32:05 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp --- apps/bMiniApp/src/utils/common/localtion.ts | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/apps/bMiniApp/src/utils/common/localtion.ts b/apps/bMiniApp/src/utils/common/localtion.ts new file mode 100644 index 0000000..55cdb3c --- /dev/null +++ b/apps/bMiniApp/src/utils/common/localtion.ts @@ -0,0 +1,12 @@ +import { LocationUtils } from '@12333/utils'; +import { useUserStoreWithOut } from '@/stores/modules/user'; + +export async function setLocationCity() { + try { + let res = await LocationUtils.getLocation(); + if (res?.result?.ad_info?.city) { + const userStore = useUserStoreWithOut(); + userStore.setLocationCity(res.result.ad_info.city, res.result.ad_info.province); + } + } catch (error) {} +} -- Gitblit v1.9.1