zhengyiming
5 天以前 dd0a3e0ed394983c4fbacdab64cad6f8de5b4884
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) {}
}