From 40685b41a522fe9cbe54eb126049331860fcb35c Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Fri, 7 Nov 2025 09:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=AF=A6=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api.js | 34 +- components/CustomerManagement.vue | 8 +- pages.json | 7 + pages/customer-detail/index.vue | 960 ++++++++++++++++++++++++++++++ 4 files changed, 1004 insertions(+), 5 deletions(-) create mode 100644 pages/customer-detail/index.vue diff --git a/common/api.js b/common/api.js index 2d38078..1c733cc 100644 --- a/common/api.js +++ b/common/api.js @@ -210,10 +210,42 @@ export const getCustomerList = (params = {}) => { * @returns {Promise} 返回客户详情 */ export const getCustomerDetail = (id) => { - return uni.$uv.http.get(`customer/${id}`, { + return uni.$uv.http.get(`bst/customer/${id}`, { custom: { auth: true // 启用 token 认证 } }); }; +/** + * 获取客户跟进动态列表 + * @param {string} customerId 客户ID + * @returns {Promise} 返回跟进动态列表 + */ +export const getCustomerFollowupList = (customerId) => { + return uni.$uv.http.get(`bst/customer/followup/list`, { + params: { + customerId: customerId + }, + custom: { + auth: true + } + }); +}; + +/** + * 获取客户项目列表 + * @param {string} customerId 客户ID + * @returns {Promise} 返回项目列表 + */ +export const getCustomerProjects = (customerId) => { + return uni.$uv.http.get(`bst/customer/projects`, { + params: { + customerId: customerId + }, + custom: { + auth: true + } + }); +}; + diff --git a/components/CustomerManagement.vue b/components/CustomerManagement.vue index 983a912..4512e18 100644 --- a/components/CustomerManagement.vue +++ b/components/CustomerManagement.vue @@ -235,10 +235,10 @@ const loadCustomerList = async () => { // 处理客户点击 const handleCustomerClick = (customer) => { console.log('点击客户:', customer); - // 可以跳转到客户详情页 - // uni.navigateTo({ - // url: `/pages/customer-detail/index?id=${customer.id}` - // }); + // 跳转到客户详情页 + uni.navigateTo({ + url: `/pages/customer-detail/index?id=${customer.id}` + }); }; // 处理跟进 diff --git a/pages.json b/pages.json index c49f25a..7391334 100644 --- a/pages.json +++ b/pages.json @@ -68,6 +68,13 @@ "navigationBarTitleText": "申请详情", "navigationStyle": "custom" } + }, + { + "path": "pages/customer-detail/index", + "style": { + "navigationBarTitleText": "客户详情", + "navigationStyle": "custom" + } } ], diff --git a/pages/customer-detail/index.vue b/pages/customer-detail/index.vue new file mode 100644 index 0000000..9956e4d --- /dev/null +++ b/pages/customer-detail/index.vue @@ -0,0 +1,960 @@ + + + + +