- {it.type === "click" && "📱"}
- {it.type === "message" && "💬"}
- {it.type === "purchase" && "💲"}
- {it.type === "view" && "👁️"}
-
-
- {it.type === "click" && "点击行为"}
- {it.type === "message" && "消息互动"}
- {it.type === "purchase" && "购买行为"}
- {it.type === "view" && "页面浏览"}
+
+ {/* 内容区域 */}
+
+ {activeTab === "basic" && (
+
+ {/* 关联信息 */}
+
+
+ 设备
+ 微信号
+ 客服
+ 添加时间
+ 最近互动
+
+
+
+ {/* RFM评分 */}
+ {user.rfmScore && (
+
+
+
+
最近性(R)
+
+ {user.rfmScore.recency}
+
-
- {it.content}
- {it.type === "purchase" && it.value && (
-
- ¥{it.value}
-
- )}
+
+
频率(F)
+
+ {user.rfmScore.frequency}
+
+
+
+
金额(M)
+
+ {user.rfmScore.monetary}
+
+
+
+
总分
+
+ {user.rfmScore.totalScore}/15
+
-
- {it.timestamp}
-
-
- ))
- ) : (
-
- 暂无互动记录
-
- )}
-
- )}
- {activeTab === "tags" && (
-
-
- {user.tags && user.tags.length > 0 ? (
- user.tags.map(tag => (
-
- {tag}
-
- ))
- ) : (
-
暂无标签
+
)}
+
+ {/* 流量池 */}
+ {user.trafficPools && (
+
+
+
+ 当前池:
+
+ {user.trafficPools.currentPool}
+
+
+
+ 可选池:
+ {user.trafficPools.availablePools.map((pool, index) => (
+
+ {pool}
+
+ ))}
+
+
+
+ )}
+
+ {/* 统计数据 */}
+
+
+
+
+ {/* 好友统计 */}
+
+
+
+
+ {user.userInfo.friendShip.totalFriend}
+
+
总好友
+
+
+
+ {user.userInfo.friendShip.maleFriend}
+
+
男性好友
+
+
+
+ {user.userInfo.friendShip.femaleFriend}
+
+
女性好友
+
+
+
+ {user.userInfo.friendShip.unknowFriend}
+
+
未知性别
+
+
+
+
+ {/* 限制记录 */}
+
+ {user.restrictions && user.restrictions.length > 0 ? (
+
+ {user.restrictions.map(restriction => (
+
+ {restriction.reason || "未知原因"}
+
+ {getRestrictionLevelText(restriction.level)}
+
+
+ }
+ description={
+
+ 限制ID: {restriction.id}
+ {restriction.date && (
+
+ 限制时间: {formatDate(restriction.date)}
+
+ )}
+
+ }
+ />
+ ))}
+
+ ) : (
+
+
+
+
+
暂无限制记录
+
+ 该用户没有任何限制记录
+
+
+ )}
+
-
-
- )}
+ )}
+
+ {activeTab === "journey" && (
+
+
+ {journeyLoading && journeyList.length === 0 ? (
+
+ ) : journeyList.length === 0 ? (
+
+
+
+
+
暂无互动记录
+
+ 该用户还没有任何互动行为
+
+
+ ) : (
+
+ {journeyList.map(record => (
+
+ {record.remark}
+
+ {formatDateTime(record.createTime)}
+
+
+ }
+ />
+ ))}
+ {journeyLoading && journeyList.length > 0 && (
+
+
+ 加载更多...
+
+ )}
+ {!journeyLoading && journeyList.length < journeyTotal && (
+
+
+
+ )}
+
+ )}
+
+
+ )}
+
+ {activeTab === "tags" && (
+
+ {/* 用户标签 */}
+
+ {tagsLoading && userTagsList.length === 0 ? (
+
+ ) : userTagsList.length === 0 ? (
+
+
+
+
+
暂无用户标签
+
该用户还没有任何标签
+
+ ) : (
+
+ {userTagsList.map((tag, index) => (
+
+ {tag.name}
+
+ ))}
+
+ )}
+
+
+ {/* 价值标签 */}
+
+ {user.valueTags && user.valueTags.length > 0 ? (
+
+ {user.valueTags.map(tag => (
+
+
+
+ {tag.icon === "crown" && }
+ {tag.name}
+
+
+ RFM总分: {tag.rfmScore}/15
+
+
+
+
+ 价值等级:
+
+
+ {tag.valueLevel}
+
+
+
+ ))}
+
+ ) : (
+
+
+
+
+
暂无价值标签
+
+ 该用户还没有任何价值标签
+
+
+ )}
+
+
+ {/* 添加新标签按钮 */}
+
+
+ )}
+
);
diff --git a/nkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx b/nkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx
index a505ea41..7e000524 100644
--- a/nkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx
+++ b/nkebao/src/pages/mobile/mine/traffic-pool/list/index.tsx
@@ -191,7 +191,9 @@ const TrafficPoolList: React.FC = () => {
navigate(`/traffic-pool/detail/${item.id}`)}
+ onClick={() =>
+ navigate(`/traffic-pool/detail/${item.sourceId}/${item.id}`)
+ }
>
{
path: "/workspace/traffic-distribution",
bgColor: "#e6f7ff",
},
- {
- id: "ai-assistant",
- name: "AI对话助手",
- description: "智能回复,提高互动质量",
- icon: (
-
- ),
- path: "/workspace/ai-assistant",
- bgColor: "#e6f7ff",
- isNew: true,
- },
];
// AI智能助手
@@ -176,7 +165,7 @@ const Workspace: React.FC = () => {
{/* AI智能助手 */}
-
+ {/*
AI 智能助手
{aiFeatures.map(feature => (
@@ -205,7 +194,7 @@ const Workspace: React.FC = () => {
))}
-
+
*/}
);
diff --git a/nkebao/src/router/module/mine.tsx b/nkebao/src/router/module/mine.tsx
index 7a190068..46e852e8 100644
--- a/nkebao/src/router/module/mine.tsx
+++ b/nkebao/src/router/module/mine.tsx
@@ -29,7 +29,7 @@ const routes = [
auth: true,
},
{
- path: "/traffic-pool/detail/:id",
+ path: "/traffic-pool/detail/:wxid/:userId",
element:
,
auth: true,
},
diff --git a/nkebao/vite.config.ts b/nkebao/vite.config.ts
index f1a085ec..921473b6 100644
--- a/nkebao/vite.config.ts
+++ b/nkebao/vite.config.ts
@@ -13,15 +13,29 @@ export default defineConfig({
open: true,
},
build: {
- chunkSizeWarningLimit: 1500, // 提高警告阈值,减少无关警告
+ chunkSizeWarningLimit: 2000,
rollupOptions: {
output: {
+ // 减少文件数量,合并更多依赖
manualChunks: {
- "react-vendor": ["react", "react-dom"],
- "antd-vendor": ["antd", "@ant-design/icons", "antd-mobile"],
- "echarts-vendor": ["echarts", "echarts-for-react"],
+ // 核心框架
+ vendor: ["react", "react-dom", "react-router-dom"],
+ // UI组件库
+ ui: ["antd", "@ant-design/icons", "antd-mobile"],
+ // 工具库
+ utils: ["axios", "dayjs", "zustand"],
+ // 图表库
+ charts: ["echarts", "echarts-for-react"],
},
+ // 文件名格式
+ chunkFileNames: "assets/[name]-[hash].js",
+ entryFileNames: "assets/[name]-[hash].js",
+ assetFileNames: "assets/[name]-[hash].[ext]",
},
},
+ // 启用压缩
+ minify: "esbuild",
+ // 启用源码映射(可选,生产环境可以关闭)
+ sourcemap: false,
},
});