From cad75b92bcd733acc827c35b9a6801f5fab6b506 Mon Sep 17 00:00:00 2001 From: shanshanzhong Date: Mon, 25 May 2026 19:52:20 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=87=E6=B3=A8=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=97=B6=E6=90=BA=E5=B8=A6=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RemarkForm 的 onSave 回调之前只传 user_id 和 remark, 导致后端用零值覆盖邀请人、余额、佣金等字段。 参考 enable 开关的模式,排除不兼容字段后展开 ...rest, 保证 updateUserBasicInfo 收到完整的用户数据。 Co-authored-by: multica-agent --- apps/admin/src/sections/user/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/admin/src/sections/user/index.tsx b/apps/admin/src/sections/user/index.tsx index 061c22e..b5bf332 100644 --- a/apps/admin/src/sections/user/index.tsx +++ b/apps/admin/src/sections/user/index.tsx @@ -329,10 +329,20 @@ export default function User() { CloseComponent={PopoverClose} onSave={async (remark) => { const { + auth_methods: _auth_methods, + user_devices: _user_devices, + enable_balance_notify: _enable_balance_notify, + enable_login_notify: _enable_login_notify, + enable_subscribe_notify: _enable_subscribe_notify, + enable_trade_notify: _enable_trade_notify, + updated_at: _updated_at, + created_at: _created_at, id, + ...rest } = row.original; await updateUserBasicInfo({ user_id: id, + ...rest, remark, } as unknown as API.UpdateUserBasiceInfoRequest); toast.success(t('updateSuccess'));