From dced4d6ca569588ba114ab368e8b39f0506f4d06 Mon Sep 17 00:00:00 2001 From: huangzhe Date: Mon, 28 Jul 2025 10:17:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=AD=E5=BB=BA=E9=A1=B5=E9=9D=A2=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/generatedRouter/index.js | 23 + src/views/AI-new/components/HotProducts.vue | 103 +++ src/views/AI-new/components/chat-new.vue | 601 ++++++++++++++++++ .../AI-new/components/js/request-params.js | 3 + src/views/AI-new/components/message.vue | 268 ++++++++ src/views/AI-new/index.vue | 190 ++++++ .../AI-new/views/productKnowledge/index.vue | 188 ++++++ .../AI-new/views/productRecommend/index.vue | 194 ++++++ src/views/AI/components/message.vue | 41 +- src/views/app/Home.vue | 5 + .../customer/components/RecommendTips.vue | 28 + src/views/customer/index.vue | 48 +- 12 files changed, 1660 insertions(+), 32 deletions(-) create mode 100644 src/views/AI-new/components/HotProducts.vue create mode 100644 src/views/AI-new/components/chat-new.vue create mode 100644 src/views/AI-new/components/js/request-params.js create mode 100644 src/views/AI-new/components/message.vue create mode 100644 src/views/AI-new/index.vue create mode 100644 src/views/AI-new/views/productKnowledge/index.vue create mode 100644 src/views/AI-new/views/productRecommend/index.vue create mode 100644 src/views/customer/components/RecommendTips.vue diff --git a/src/router/generatedRouter/index.js b/src/router/generatedRouter/index.js index 6201560..c1d956f 100644 --- a/src/router/generatedRouter/index.js +++ b/src/router/generatedRouter/index.js @@ -31,4 +31,27 @@ export default [ title: '产品推荐', }, }, + { + path: '/productAssistant', + name: 'productAssistant', + component: () => import('@/views/AI-new/index.vue'), + meta: { + title: '产品助手', + }, + },{ + path: '/productKnowledge', + name: 'productKnowledge', + component: () => import('@/views/AI-new/views/productKnowledge/index.vue'), + meta: { + title: '产品知识助手', + }, + }, + { + path: '/productRecommend', + name: 'productRecommend', + component: () => import('@/views/AI-new/views/productRecommend/index.vue'), + meta: { + title: '产品推荐助手', + }, + }, ] diff --git a/src/views/AI-new/components/HotProducts.vue b/src/views/AI-new/components/HotProducts.vue new file mode 100644 index 0000000..e0b9f86 --- /dev/null +++ b/src/views/AI-new/components/HotProducts.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/views/AI-new/components/chat-new.vue b/src/views/AI-new/components/chat-new.vue new file mode 100644 index 0000000..0cdd2ba --- /dev/null +++ b/src/views/AI-new/components/chat-new.vue @@ -0,0 +1,601 @@ + + + + diff --git a/src/views/AI-new/components/js/request-params.js b/src/views/AI-new/components/js/request-params.js new file mode 100644 index 0000000..9be8b7f --- /dev/null +++ b/src/views/AI-new/components/js/request-params.js @@ -0,0 +1,3 @@ +let currentSenderActionType = 'product_recommend' + +const senderActionType = ['product_recommend', 'chat', 'normal_chat'] diff --git a/src/views/AI-new/components/message.vue b/src/views/AI-new/components/message.vue new file mode 100644 index 0000000..e4da34e --- /dev/null +++ b/src/views/AI-new/components/message.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/src/views/AI-new/index.vue b/src/views/AI-new/index.vue new file mode 100644 index 0000000..5cc8a5c --- /dev/null +++ b/src/views/AI-new/index.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/AI-new/views/productKnowledge/index.vue b/src/views/AI-new/views/productKnowledge/index.vue new file mode 100644 index 0000000..b46f64d --- /dev/null +++ b/src/views/AI-new/views/productKnowledge/index.vue @@ -0,0 +1,188 @@ + + + + + diff --git a/src/views/AI-new/views/productRecommend/index.vue b/src/views/AI-new/views/productRecommend/index.vue new file mode 100644 index 0000000..97c5272 --- /dev/null +++ b/src/views/AI-new/views/productRecommend/index.vue @@ -0,0 +1,194 @@ + + + + + \ No newline at end of file diff --git a/src/views/AI/components/message.vue b/src/views/AI/components/message.vue index 132e787..ed7ab96 100644 --- a/src/views/AI/components/message.vue +++ b/src/views/AI/components/message.vue @@ -12,7 +12,8 @@ {{ message.text ? '思考完成' : '思考中...' }} - +

@@ -22,22 +23,24 @@ -

此内容由AI生成
+
+ +
+ + +
+
- -
- - -
+ @@ -103,7 +106,7 @@ export default { \ No newline at end of file diff --git a/src/views/customer/index.vue b/src/views/customer/index.vue index 9a2705e..50abe14 100644 --- a/src/views/customer/index.vue +++ b/src/views/customer/index.vue @@ -5,13 +5,9 @@
- + +
@@ -20,16 +16,9 @@ - + @@ -39,10 +28,11 @@ import SvgIcon from '@/components/svg-icon/index.vue' import HotProducts from '@/views/AI/components/HotProducts.vue' import chatMessage from '@/views/AI/components/chat.vue' import messageComponent from '@/views/AI/components/message.vue' - +import RecommendTips from "./components/RecommendTips.vue" export default { components: { SvgIcon, + RecommendTips, messageComponent, [Icon.name]: Icon, [NavBar.name]: NavBar, @@ -52,6 +42,22 @@ export default { data() { return { hotList: [], + commendList: [{ + title: '请为我推荐一款重疾险。', + action: () => { + console.log('请为我推荐一款重疾险。'); + } + }, { + title: "60周岁以上可以投保保险产品吗?", + action: () => { + console.log('60周岁以上可以投保保险产品吗?'); + } + }, { + title: "60周岁以上可以投保保险产品吗?", + action: () => { + console.log('60周岁以上可以投保保险产品吗?'); + } + }], productName: '', conversationId: '', messageStatus: 'stop', @@ -59,7 +65,7 @@ export default { messages: [ { type: 'bot', - text: '欢迎使用AI客服助手,请输入问题开始对话。', + text: 'HI,我是长生产品助手,可以为你推荐产品、答疑解惑,请点击以下功能体检。', }, ], isSearching: false, @@ -69,6 +75,9 @@ export default { } }, methods: { + handleActiveItem(cb) { + cb() + }, getIsThink(e) { this.isThink = e }, @@ -145,6 +154,7 @@ $primary-trans-color: rgba(135, 162, 208, 0.5); .chat-content { height: 100%; + .message-area { height: 100%; overflow-y: auto;