From af753de48142e7e13d48ea4a3511bb0bc7012b1d Mon Sep 17 00:00:00 2001 From: shaw Date: Tue, 6 Jan 2026 09:04:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=90=86=E6=9B=B4=E6=96=B0=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/account/BulkEditAccountModal.vue | 3 ++- frontend/src/components/account/EditAccountModal.vue | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/account/BulkEditAccountModal.vue b/frontend/src/components/account/BulkEditAccountModal.vue index 6dba60fe..51ad32d1 100644 --- a/frontend/src/components/account/BulkEditAccountModal.vue +++ b/frontend/src/components/account/BulkEditAccountModal.vue @@ -831,7 +831,8 @@ const buildUpdatePayload = (): Record | null => { let credentialsChanged = false if (enableProxy.value) { - updates.proxy_id = proxyId.value + // 后端期望 proxy_id: 0 表示清除代理,而不是 null + updates.proxy_id = proxyId.value === null ? 0 : proxyId.value } if (enableConcurrency.value) { diff --git a/frontend/src/components/account/EditAccountModal.vue b/frontend/src/components/account/EditAccountModal.vue index c1ad5ddb..4ac149f2 100644 --- a/frontend/src/components/account/EditAccountModal.vue +++ b/frontend/src/components/account/EditAccountModal.vue @@ -1053,6 +1053,10 @@ const handleSubmit = async () => { submitting.value = true try { const updatePayload: Record = { ...form } + // 后端期望 proxy_id: 0 表示清除代理,而不是 null + if (updatePayload.proxy_id === null) { + updatePayload.proxy_id = 0 + } // For apikey type, handle credentials update if (props.account.type === 'apikey') {