From 2334da9f642ac52b2abd042b5f6840a4afa95937 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 15 八月 2025 16:44:24 +0800
Subject: [PATCH] fix: bug
---
apps/bMiniApp/src/hooks/user.ts | 41 ++++++++++++++---------------------------
1 files changed, 14 insertions(+), 27 deletions(-)
diff --git a/apps/bMiniApp/src/hooks/user.ts b/apps/bMiniApp/src/hooks/user.ts
index f104353..8e97ad1 100644
--- a/apps/bMiniApp/src/hooks/user.ts
+++ b/apps/bMiniApp/src/hooks/user.ts
@@ -2,7 +2,6 @@
import Taro from '@tarojs/taro';
import { object2query, LocationUtils } from '@12333/utils';
import { ParkOrHRStatus, UserCertificationFrontStatus } from '@12333/constants';
-import * as userServices from '@12333/services/api/User';
import { useQuery } from '@tanstack/vue-query';
import { MaybeRef } from 'vue';
import { useRefeshDidShow } from '@12333/hooks/infiniteLoading';
@@ -16,31 +15,31 @@
return userStore.getCurrentUserInfo();
}
- const isCompanyAudited = computed(() => {
- return userDetail.value?.openHRSiteStatus === ParkOrHRStatus.Running;
- });
+ // const isCompanyAudited = computed(() => {
+ // return userDetail.value?.openHRSiteStatus === ParkOrHRStatus.Running;
+ // });
/**
* 鏄惁瀹屽杽涓汉淇℃伅锛堜紒涓氬悕绉帮紝鎵嬫満鍙凤級
*/
- const isCompletePersonalInfo = computed(() => {
- return (
- !!userDetail.value?.customerName &&
- !!userDetail.value?.contacter &&
- !!userDetail.value?.cityName
- );
- });
+ // const isCompletePersonalInfo = computed(() => {
+ // return (
+ // !!userDetail.value?.customerName &&
+ // !!userDetail.value?.contacter &&
+ // !!userDetail.value?.cityName
+ // );
+ // });
const isCertified = computed(() => {
- return userDetail.value?.frontStatus === UserCertificationFrontStatus.Certified;
+ return userDetail.value?.isReal;
});
return {
user: userInfo,
userDetail: userDetail,
updateUserInfo,
- isCompletePersonalInfo,
- isCompanyAudited,
+ // isCompletePersonalInfo,
+ // isCompanyAudited,
isCertified,
locationCity,
};
@@ -67,20 +66,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