From 4c7ee14a4b15f9ea2eb476ad3ec16259eebbc9f0 Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Fri, 7 Nov 2025 15:43:46 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=AF=A6=E7=BB=86-=E5=AE=A2?=
=?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 2 +-
pages/customer/detail/index.vue | 33 +++++++++++++++++++++------------
2 files changed, 22 insertions(+), 13 deletions(-)
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] || '--';
};
// 获取意向强度文本