zhengyiming
2025-02-17 24dc7ec489cc2206c69ad26b4c931905ad81bd8a
apps/cMiniApp/src/hooks/user.ts
@@ -67,20 +67,8 @@
  const router = Taro.useRouter();
  Taro.useReady(async () => {
    let res;
    try {
      res = await LocationUtils.getLocation();
    } catch (error) {}
    if (isLogin.value && userStore.firstGetUserDetail) {
      userStore.firstGetUserDetail = false;
      if (LocationUtils.isProvinceChange(userStore.locationProvince)) {
        userStore.resetState();
      } else {
        userStore.getCurrentUserInfo();
      }
    }
    if (res?.result?.ad_info?.city && userStore.firstSetLocation) {
      userStore.setLocationCity(res.result.ad_info.city, res.result.ad_info.province);
    }
    if (needAuth && !isLogin.value) {
      Taro.navigateTo({