diff --git a/App.vue b/App.vue index 6f72ade..0d1bfac 100644 --- a/App.vue +++ b/App.vue @@ -8,7 +8,7 @@ // 如果还没有 token,则设置一个测试 token const token = uni.getStorageSync('token') if (!token) { - const testToken = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjlkN2JjOTU3LTllMTYtNGI5ZC04NWZiLThiZjJlZDI3MjRjNiJ9.hJ0Tf691DnryIMp4TAsKILSy9ueN8SgeMZdp0HwxbgGOIhYl5vOUu9H64tA02jpXkB-Sg5owrBjjJxUG17yA7g' + const testToken = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjA4ZmEzNGU0LTU3NWYtNDdmMy1iY2IyLTBhMDVhNWVhOWRmNiJ9.bjaWTzwNZWyUD1UEX0te4u0a9vPhS5iLxxubgvpVF6rQ_ZhGfkvS8rdwr_kLNEWAILgLJQW3h8whDHMq9NzLtA' uni.setStorageSync('token', testToken) console.log('已设置测试 token:', testToken) } diff --git a/pages/customer/detail/index.vue b/pages/customer/detail/index.vue index d5ac8e3..cf014d4 100644 --- a/pages/customer/detail/index.vue +++ b/pages/customer/detail/index.vue @@ -37,7 +37,7 @@ 客户类型 - {{ customerDetail.customerType || '--' }} + {{ getCustomerTypeText(customerDetail.type) }} @@ -177,7 +177,7 @@ 客户意向 - {{ customerDetail.intent || '--' }} + {{ formatIntents(customerDetail.intents) }} 意向强度 @@ -185,11 +185,11 @@ 客户地区 - {{ formatRegion(customerDetail.region, customerDetail.city) }} + {{ customerDetail.regionName || '--' }} 工作微信 - {{ customerDetail.workWechat || '--' }} + {{ customerDetail.wechatId || '--' }} @@ -215,19 +215,19 @@ 顾虑点 - {{ customerDetail.concerns || '--' }} + {{ customerDetail.concern || '--' }} 痛点 - {{ customerDetail.painPoints || '--' }} + {{ customerDetail.pain || '--' }} 关注点 - {{ customerDetail.focusPoints || '--' }} + {{ customerDetail.attention || '--' }} 需求点 - {{ customerDetail.requirements || '--' }} + {{ customerDetail.demand || '--' }} @@ -438,10 +438,19 @@ const formatDeadline = (project) => { } }; -// 格式化地区 -const formatRegion = (region, city) => { - if (!region && !city) return '--'; - return [region, city].filter(Boolean).join('/'); +// 格式化客户意向(数组转字符串) +const formatIntents = (intents) => { + if (!intents || !Array.isArray(intents) || intents.length === 0) return '--'; + return intents.join('、'); +}; + +// 获取客户类型文本 +const getCustomerTypeText = (type) => { + const typeMap = { + '1': '企业客户', + '2': '个人客户' + }; + return typeMap[type] || '--'; }; // 获取意向强度文本