zhengyiming
6 天以前 e063d2153f5d2c72178a13c2c35c3f8b97f2368a
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) {}
}