From 425045571acc4b02005c790f0dc7dabba593f95a Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 19 九月 2025 11:22:19 +0800
Subject: [PATCH] fix: bug

---
 apps/cMiniApp/src/pages/mine/index.vue |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/apps/cMiniApp/src/pages/mine/index.vue b/apps/cMiniApp/src/pages/mine/index.vue
index d92cf10..ec2ea79 100644
--- a/apps/cMiniApp/src/pages/mine/index.vue
+++ b/apps/cMiniApp/src/pages/mine/index.vue
@@ -132,22 +132,34 @@
 import { useSystemStore } from '@/stores/modules/system';
 import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue';
 import { toThousand } from '@12333/utils';
+import { useIntervalFn } from 'senin-mini/hooks';
 
 const { userDetail, isCertified, updateUserInfo } = useUser();
 const isLogin = useIsLogin();
 const systemStore = useSystemStore();
-
 const { goLoginFn } = useGoLogin();
 const bgHeight = computed(() => 133 + systemStore.navHeight);
 
+const { stop, start } = useIntervalFn(updateUserInfo, 5000, {
+  immediate: false,
+});
 Taro.useDidShow(({ scene }) => {
   if (isLogin.value) {
-    setTimeout(() => {
-      updateUserInfo();
-    }, 300);
+    updateUserInfo();
+    if (userDetail.value?.realStatus === EnumPersonalUserRealStatus.Checking) {
+      start();
+    } else {
+      stop();
+    }
+  } else {
+    stop();
   }
 });
 
+Taro.useDidHide(() => {
+  stop();
+});
+
 function goLogin() {
   if (!isLogin.value) {
     goLoginFn();

--
Gitblit v1.9.1