From 4d3503f47e61c7a8464ba4c5c3b883403aad502c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Fri, 1 May 2026 11:33:22 +0800
Subject: [PATCH] =?UTF-8?q?feat(house):=20=E6=B7=BB=E5=8A=A0=20AI=20?=
=?UTF-8?q?=E6=89=BE=E6=88=BF=E5=8A=A9=E6=89=8B=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增 AI 找房对话弹窗组件,实现房源信息智能问答
- 房源详情页面新增 AI 找房入口按钮,点击弹出聊天窗口
- AI 聊天弹窗支持用户输入提问和快速问题按钮
- 集成豆包 Seed 2.0 Pro 模型调用,实现房源详情智能解答
- 增加聊天消息列表和打字动画,提升交互体验
- 关闭按钮和输入框交互优化,确保流畅使用体验
- 代码结构和样式规范化,保持界面美观一致
---
.idea/workspace.xml | 17 +-
components/ai-chat-popup/ai-chat-popup.vue | 455 +++++++++++++++++++++
sub_pages/house/detail.vue | 23 +-
3 files changed, 487 insertions(+), 8 deletions(-)
create mode 100644 components/ai-chat-popup/ai-chat-popup.vue
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index db9e501..7910fe1 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,9 @@
-
+
+
@@ -76,6 +77,7 @@
+
@@ -149,7 +151,15 @@
1775278015655
-
+
+
+ 1777604136710
+
+
+
+ 1777604136710
+
+
@@ -174,6 +184,7 @@
-
+
+
\ No newline at end of file
diff --git a/components/ai-chat-popup/ai-chat-popup.vue b/components/ai-chat-popup/ai-chat-popup.vue
new file mode 100644
index 0000000..3e32e20
--- /dev/null
+++ b/components/ai-chat-popup/ai-chat-popup.vue
@@ -0,0 +1,455 @@
+
+
+
+
+
+
+
+
+
+
+
+ 🏠
+ 您好,我是AI找房助手
+ 我可以帮您了解这套房源的详细信息、分析性价比、解答入住疑问等,请问有什么可以帮您?
+
+ 性价比分析
+ 交通情况
+ 配套设施
+
+
+
+
+
+
+
+ AI
+
+
+
+ {{ msg.content }}
+
+
+
+ 我
+
+
+
+
+
+
+ AI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发送
+
+
+
+
+
+
+
+
+
+
diff --git a/sub_pages/house/detail.vue b/sub_pages/house/detail.vue
index 2ca31de..55cd271 100644
--- a/sub_pages/house/detail.vue
+++ b/sub_pages/house/detail.vue
@@ -195,9 +195,9 @@
-->
-
-
-
+
+
+ AI找房
@@ -224,6 +224,8 @@
:apiCall="posterPreviewApiCall"
:apiParam="{}"
/>
+
+
@@ -238,6 +240,7 @@
import ShareSheet from '@/components/share-sheet'
import HousePosterGenerator from '@/components/house-poster-generator'
import GoodsPosterPopup from '@/components/goods-poster-popup'
+ import AiChatPopup from '@/components/ai-chat-popup/ai-chat-popup.vue'
const menu = [{
name: '推荐',
@@ -347,7 +350,8 @@
components: {
ShareSheet,
HousePosterGenerator,
- GoodsPosterPopup
+ GoodsPosterPopup,
+ AiChatPopup
},
data() {
return {
@@ -393,7 +397,9 @@
showPosterPreview: false,
currentPosterUrl: '',
dealerId: 0,
- mobile: ''
+ mobile: '',
+ // AI找房弹窗
+ showAIChat: false
};
},
@@ -803,6 +809,13 @@
})
},
+ // AI找房:打开对话弹窗
+ openAIChat() {
+ console.log('openAIChat called, showAIChat before:', this.showAIChat)
+ this.showAIChat = true
+ console.log('showAIChat after:', this.showAIChat)
+ },
+
// 下载海报图片
downloadPosterImage(imageUrl) {
if (!imageUrl) {