From 5eb6e6bab29554390851bbed86615110e62efa48 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 11 八月 2025 13:43:18 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp

---
 apps/cMiniApp/src/hooks/user.ts |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/apps/cMiniApp/src/hooks/user.ts b/apps/cMiniApp/src/hooks/user.ts
index f104353..d81560c 100644
--- a/apps/cMiniApp/src/hooks/user.ts
+++ b/apps/cMiniApp/src/hooks/user.ts
@@ -10,7 +10,7 @@
 export function useUser() {
   const userStore = useUserStore();
 
-  const { userDetail, userInfo, locationCity } = storeToRefs(userStore);
+  const { userDetail, userInfo, locationCity, userId } = storeToRefs(userStore);
 
   function updateUserInfo() {
     return userStore.getCurrentUserInfo();
@@ -43,6 +43,7 @@
     isCompanyAudited,
     isCertified,
     locationCity,
+    userId,
   };
 }
 
@@ -67,20 +68,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({

--
Gitblit v1.9.1