diff --git a/pages/customer/detail/index.vue b/pages/customer/detail/index.vue index 1dbf713..20b1937 100644 --- a/pages/customer/detail/index.vue +++ b/pages/customer/detail/index.vue @@ -12,33 +12,50 @@ + + 客户昵称 + {{ customerDetail.contactName || customerDetail.name || '--' }} + 客户状态 {{ getStatusText(customerDetail.status) }} + + + + + + 客户意向 + {{ formatIntents(customerDetail.intents) }} + + + 意向强度 + {{ getIntentStrengthText(customerDetail.intentLevel) }} + 客户归属 {{ customerDetail.followName || '未分配' }} - - 客户类型 - {{ getCustomerTypeText(customerDetail.type) }} - - - - - 联系人 - {{ customerDetail.contactName || customerDetail.name || '--' }} - 最近跟进 {{ formatDateTime(customerDetail.lastFollowTime) }} + + + 微信号 + {{ customerDetail.wechat || '--' }} + + + 微信好友 + {{ customerDetail.wechatId || '--' }} + + + @@ -235,13 +252,28 @@ const formatDateTime = (dateTime) => { }; -// 获取客户类型文本 -const getCustomerTypeText = (type) => { - const typeMap = { - '1': '企业客户', - '2': '个人客户' +// 格式化客户意向(数组转字符串) +const formatIntents = (intents) => { + if (!intents) return '--'; + // 如果是数组,直接join + if (Array.isArray(intents)) { + return intents.length > 0 ? intents.join('、') : '--'; + } + // 如果是字符串(逗号分隔),直接返回 + if (typeof intents === 'string') { + return intents || '--'; + } + return '--'; +}; + +// 获取意向强度文本 +const getIntentStrengthText = (intentLevel) => { + const levelMap = { + '1': '高', + '2': '中', + '3': '低' }; - return typeMap[type] || '--'; + return levelMap[intentLevel] || '--'; }; // 返回