| | |
| | | import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue'; |
| | | import { toThousand } from '@12333/utils'; |
| | | import { useIntervalFn } from 'senin-mini/hooks'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | |
| | | const { userDetail, isCertified, updateUserInfo } = useUser(); |
| | | const isLogin = useIsLogin(); |
| | |
| | | const { goLoginFn } = useGoLogin(); |
| | | const bgHeight = computed(() => 133 + systemStore.navHeight); |
| | | |
| | | const { stop, start } = useIntervalFn(updateUserInfo, 5000, { |
| | | immediate: false, |
| | | }); |
| | | Taro.useDidShow(({ scene }) => { |
| | | if (isLogin.value) { |
| | | updateUserInfo(); |
| | | if (userDetail.value?.realStatus !== EnumPersonalUserRealStatus.Real) { |
| | | start(); |
| | | } else { |
| | | stop(); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | Taro.useDidHide(() => { |
| | | stop(); |
| | | useQuery({ |
| | | queryKey: ['updateUserInfo'], |
| | | queryFn: () => { |
| | | return updateUserInfo(); |
| | | }, |
| | | enabled: computed( |
| | | () => isLogin.value && userDetail.value?.realStatus === EnumPersonalUserRealStatus.Checking |
| | | ), |
| | | refetchInterval: 5000, |
| | | }); |
| | | |
| | | function goLogin() { |
| | |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const { userDetail } = useUser(); |
| | | const { userDetail, updateUserInfo } = useUser(); |
| | | const router = Taro.useRouter(); |
| | | const type = router.params?.type ?? ''; |
| | | |
| | |
| | | let res = await electronSignServices.personalUserFaceReal(params); |
| | | if (res) { |
| | | const encodedUrl = encodeURIComponent(res); |
| | | updateUserInfo(); |
| | | Taro.navigateTo({ url: `${RouterPath.extraPage}?url=${encodedUrl}` }); |
| | | } |
| | | } catch (error) {} |