From e4695dd503c294d55e22922e0563a9c07e199317 Mon Sep 17 00:00:00 2001 From: ZLY Date: Wed, 21 Jan 2026 18:02:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(shareCollaborationModal):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=88=86=E4=BA=AB=E5=8D=8F=E4=BD=9C=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8D=8F=E4=BD=9C=E8=80=85=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/componentCollaborator.ts | 6 +++--- .../componentList/shareCollaborationModal.tsx | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/api/componentCollaborator.ts b/src/api/componentCollaborator.ts index db151d8..ae58cb4 100644 --- a/src/api/componentCollaborator.ts +++ b/src/api/componentCollaborator.ts @@ -5,7 +5,7 @@ const urlPrefix = '/api/v1/bpms-workbench'; // 添加协作用户 export function addCollaborator(params: { - componentBaseId: string|number, + componentBaseId: string | number, collaboratorId: string, permission: string }) { @@ -13,8 +13,8 @@ export function addCollaborator(params: { } // 删除协作用户 -export function deleteCollaborator(params: { id: string }) { - return axios.post(`${urlPrefix}/componentCollaborator/delete`, params); +export function deleteCollaborator(id: string) { + return axios.post(`${urlPrefix}/componentCollaborator/delete?id=${id}`); } // 组件协作 同步gitea协作者数据到本地 diff --git a/src/pages/componentDevelopment/componentList/shareCollaborationModal.tsx b/src/pages/componentDevelopment/componentList/shareCollaborationModal.tsx index 214c8be..d4d3ee9 100644 --- a/src/pages/componentDevelopment/componentList/shareCollaborationModal.tsx +++ b/src/pages/componentDevelopment/componentList/shareCollaborationModal.tsx @@ -145,7 +145,7 @@ const ShareCollaborationModal: React.FC = ({ okButtonProps: { status: 'danger' }, onOk: async () => { try { - const res: any = await deleteCollaborator({ id: collaboratorId }); + const res: any = await deleteCollaborator(collaboratorId); if (res.code === 200) { Message.success('移除协作者成功'); fetchCollaboratorList(); @@ -180,7 +180,8 @@ const ShareCollaborationModal: React.FC = ({ Message.success('权限更新成功'); fetchCollaboratorList(); onSuccess?.(); - } else { + } + else { Message.error(res.msg || '权限更新失败'); } } catch (error) {