diff --git a/App.vue b/App.vue index 19f2151..1c56512 100644 --- a/App.vue +++ b/App.vue @@ -8,7 +8,7 @@ // 如果还没有 token,则设置一个测试 token const token = uni.getStorageSync('token') if (!token) { - const testToken = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjJiNWZkNDAyLTFiYWQtNDI5YS04ZDFkLTllZGE0Y2VkOWIxMyJ9.2UEvAG6OtJ0WZoJxjPjGzGhdgxAclzEqqPl_K94kbcCVs9YplENwZe2AcdsLkdLsc7EnDbRif-xuhWlTKF78WQ' + const testToken = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI4MDUzOGE0LThjNTQtNGZlMy04NmMwLThhYzhlZmMwMTg1ZCJ9.xalBJnQcnxHsHUVFn46XXamKBPA2RdDtvVvhRQwc7j-lARywOjKMfSqjUiSe8DbWMKt1iBZIz0Z0JDYX7IGb_g' uni.setStorageSync('token', testToken) console.log('已设置测试 token:', testToken) } diff --git a/common/api/customer.js b/common/api/customer.js index fe5f598..73256db 100644 --- a/common/api/customer.js +++ b/common/api/customer.js @@ -166,6 +166,37 @@ export const createCustomer = (data) => { }); }; +/** + * 更新客户 + * @param {Object} data 客户数据(必须包含id) + * @param {string} data.id 客户ID + * @param {string} data.type 类型 + * @param {string} data.name 客户名 + * @param {string} data.mobile 手机号 + * @param {string} data.wechat 微信号 + * @param {string} data.source 来源 + * @param {string} data.intents 意向的设备,逗号分离 + * @param {string} data.status 状态(1潜在2意向3成交4失效) + * @param {string} data.intentLevel 意向强度 + * @param {string} data.customerStatus 客户状态 + * @param {string} data.customerIntentLevel 客户意向强度 + * @param {string} data.nextFollowTime 下次跟进时间 + * @param {string} data.followId 跟进人id + * @param {string} data.remark 备注 + * @param {string} data.concern 顾虑点 + * @param {string} data.pain 痛点 + * @param {string} data.attention 关注点 + * @param {string} data.demand 需求点 + * @returns {Promise} 返回更新结果 + */ +export const updateCustomer = (data) => { + return uni.$uv.http.put(`bst/customer`, data, { + custom: { + auth: true + } + }); +}; + /** * 获取客户意向字典数据 * @returns {Promise} 返回字典数据数组,包含 dictLabel 和 dictValue diff --git a/components/customer-form/CustomerBasicInfo.vue b/components/customer-form/CustomerBasicInfo.vue new file mode 100644 index 0000000..700ceb7 --- /dev/null +++ b/components/customer-form/CustomerBasicInfo.vue @@ -0,0 +1,203 @@ + + + + + + diff --git a/components/customer-form/CustomerFormNavbar.vue b/components/customer-form/CustomerFormNavbar.vue new file mode 100644 index 0000000..ff11cf2 --- /dev/null +++ b/components/customer-form/CustomerFormNavbar.vue @@ -0,0 +1,54 @@ + + + + + + diff --git a/components/customer-form/CustomerOtherInfo.vue b/components/customer-form/CustomerOtherInfo.vue new file mode 100644 index 0000000..7af45b1 --- /dev/null +++ b/components/customer-form/CustomerOtherInfo.vue @@ -0,0 +1,196 @@ +