zhengyiming
2025-02-17 ae1b411fcb54f794646b32b29c47cb380163f95e
1
2
3
4
5
6
7
8
9
10
11
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) {}
}