From 2b5ab616684febd7bcb470150d05e6f08231269f Mon Sep 17 00:00:00 2001 From: zhangjf Date: Sun, 15 Feb 2026 19:11:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E4=BA=BA=E7=AE=A1=E7=90=86API=E8=B7=AF=E5=BE=84=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: - 前端API使用旧路径 /cust/api/v1/customer-contact - 后端已改为 /cust/api/v1/contact - getContactList接口参数不匹配(单个customerId vs params对象) 修复: - 统一前端API路径为 /cust/api/v1/contact - 修改getContactList为分页查询接口,支持params参数 - 修改前端页面调用方式,传递完整的查询参数 - 支持按客户ID和联系人姓名筛选 现在前后端API路径完全一致! --- fund-admin/src/api/customer.js | 13 +++++++------ fund-admin/src/views/customer/contact.vue | 20 +++++++------------- fund-cust.log | 1 + fundplatform | 2 +- 4 files changed, 16 insertions(+), 20 deletions(-) create mode 100644 fund-cust.log diff --git a/fund-admin/src/api/customer.js b/fund-admin/src/api/customer.js index 77deaf6..49d3124 100644 --- a/fund-admin/src/api/customer.js +++ b/fund-admin/src/api/customer.js @@ -38,16 +38,17 @@ export const deleteCustomer = (id) => { }) } -export const getContactList = (customerId) => { +export const getContactList = (params) => { return request({ - url: `/cust/api/v1/customer-contact/list/${customerId}`, - method: 'get' + url: '/cust/api/v1/contact/list', + method: 'get', + params }) } export const createContact = (data) => { return request({ - url: '/cust/api/v1/customer-contact', + url: '/cust/api/v1/contact', method: 'post', data }) @@ -55,7 +56,7 @@ export const createContact = (data) => { export const updateContact = (id, data) => { return request({ - url: `/cust/api/v1/customer-contact/${id}`, + url: `/cust/api/v1/contact/${id}`, method: 'put', data }) @@ -63,7 +64,7 @@ export const updateContact = (id, data) => { export const deleteContact = (id) => { return request({ - url: `/cust/api/v1/customer-contact/${id}`, + url: `/cust/api/v1/contact/${id}`, method: 'delete' }) } diff --git a/fund-admin/src/views/customer/contact.vue b/fund-admin/src/views/customer/contact.vue index c8bb70b..d642ce4 100644 --- a/fund-admin/src/views/customer/contact.vue +++ b/fund-admin/src/views/customer/contact.vue @@ -198,21 +198,15 @@ const loadCustomerList = async () => { } const loadTableData = async () => { - if (!searchForm.customerId) { - tableData.value = [] - return - } - try { - const res = await getContactList(searchForm.customerId) - let contacts = res || [] - - // 根据姓名过滤 - if (searchForm.contactName) { - contacts = contacts.filter(c => c.contactName.includes(searchForm.contactName)) + const params = { + current: 1, + size: 1000, + customerId: searchForm.customerId || undefined, + contactName: searchForm.contactName || undefined } - - tableData.value = contacts + const res = await getContactList(params) + tableData.value = res.records || [] } catch (error) { ElMessage.error('加载数据失败') } diff --git a/fund-cust.log b/fund-cust.log new file mode 100644 index 0000000..fc88522 --- /dev/null +++ b/fund-cust.log @@ -0,0 +1 @@ +Error: Unable to access jarfile fund-cust-1.0.0-SNAPSHOT.jar diff --git a/fundplatform b/fundplatform index 1849191..6d49ac3 160000 --- a/fundplatform +++ b/fundplatform @@ -1 +1 @@ -Subproject commit 184919142741a540dcd8ed6e0862eba5153458d5 +Subproject commit 6d49ac30bcdfa4223053f4f0d55a577725ff7a51