From 19e797382d6a0bc80fc050f312a12845aac79287 Mon Sep 17 00:00:00 2001 From: jingrow Date: Thu, 2 Oct 2025 22:30:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=BC=80=E5=9F=9F=E5=90=8D=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E6=97=B6=E5=A6=82=E6=9E=9C=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=80=85=E6=9C=AA=E5=AE=9E=E5=90=8D=EF=BC=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=B8=80=E6=AC=A1=E5=BC=82=E6=AD=A5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=89=80=E6=9C=89=E8=80=85=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src2/components/JsiteDomainOverview.vue | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dashboard/src2/components/JsiteDomainOverview.vue b/dashboard/src2/components/JsiteDomainOverview.vue index f116768..01f97f7 100644 --- a/dashboard/src2/components/JsiteDomainOverview.vue +++ b/dashboard/src2/components/JsiteDomainOverview.vue @@ -194,6 +194,8 @@ export default { whoisProtectionLoading: false, domainOwner: null, realNameStatus: 'unverified', // 实名认证状态:verified, unverified + realNameSyncing: false, // 是否正在异步同步实名状态 + triedSyncRealName: false, // 是否已尝试过触发一次实名状态同步,避免重复 }; }, @@ -265,6 +267,10 @@ export default { this.realNameStatus = 'verified'; } else { this.realNameStatus = 'unverified'; + // 未实名时,页面打开后触发一次异步同步,随后刷新一次所有者信息 + if (!this.triedSyncRealName) { + this.syncOwnerRealNameStatus(); + } } } else { this.realNameStatus = 'unverified'; @@ -283,6 +289,34 @@ export default { this.realNameStatus = 'unverified'; } }, + // 异步同步域名实名状态(仅触发一次) + async syncOwnerRealNameStatus() { + if (this.realNameSyncing || this.triedSyncRealName) return; + if (!this.$domain.pg?.domain) return; + this.triedSyncRealName = true; + this.realNameSyncing = true; + try { + const syncRequest = createResource({ + url: 'jcloud.api.domain_west.sync_domain_info_from_west', + params: { + domain: this.$domain.pg.domain + }, + onSuccess: () => { + this.realNameSyncing = false; + // 同步完成后刷新一次所有者信息 + this.getDomainOwner(); + }, + onError: (error) => { + console.error('同步域名实名状态失败:', error); + this.realNameSyncing = false; + } + }); + syncRequest.submit(); + } catch (error) { + console.error('同步域名实名状态失败:', error); + this.realNameSyncing = false; + } + }, renewDomain() { const JsiteDomainRenewalDialog = defineAsyncComponent(() => import('./JsiteDomainRenewalDialog.vue'));