wupengfei
2025-03-21 1bbd7061dac79cacf5513234a04cac8ba0be5c6f
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);
      userStore.getCurrentUserInfo();
    }
    if (needAuth && !isLogin.value) {
      Taro.navigateTo({