From eb7de5c86fc977940ac0a4f9d80ff0ade00b3996 Mon Sep 17 00:00:00 2001 From: GouJ Date: Fri, 25 Sep 2026 00:49:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BA=AB=E4=BB=BD=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=BF=90=E8=A1=8C=E6=97=B6=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E8=BD=AE=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/subject-identity/useSubjectIdentity.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/features/subject-identity/useSubjectIdentity.ts b/src/features/subject-identity/useSubjectIdentity.ts index ae8fb44..3448284 100644 --- a/src/features/subject-identity/useSubjectIdentity.ts +++ b/src/features/subject-identity/useSubjectIdentity.ts @@ -80,7 +80,13 @@ export function useSubjectIdentity() { ) const subject = computed(() => subjects.value.find(item => item.id === selectedId.value)) const selectionKey = computed(() => subject.value?.id ?? '') - const detail = usePolling( + let detail!: ReturnType> + const detailPollInterval = computed(() => + detail?.data.value?.images.some(image => image.status === 'pending' || image.status === 'generating') + ? 4000 + : false + ) + detail = usePolling( selectionKey, async (id, signal) => { if (!id) return null @@ -91,7 +97,7 @@ export function useSubjectIdentity() { if (images.some(image => image.identityId !== identity.id)) throw new Error('身份图片与当前主体不匹配。') return { identity, images } }, - false + detailPollInterval ) const identity = computed(() => detail.data.value?.identity ?? null) const images = computed(() => detail.data.value?.images ?? [])