zhengyiming
2025-02-17 24dc7ec489cc2206c69ad26b4c931905ad81bd8a
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) {}
}