wupengfei
2025-02-18 a261170567648a5b425077049835ce8b7fb0c466
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) {}
}