feat(house): 添加 AI 找房助手功能

- 新增 AI 找房对话弹窗组件,实现房源信息智能问答
- 房源详情页面新增 AI 找房入口按钮,点击弹出聊天窗口
- AI 聊天弹窗支持用户输入提问和快速问题按钮
- 集成豆包 Seed 2.0 Pro 模型调用,实现房源详情智能解答
- 增加聊天消息列表和打字动画,提升交互体验
- 关闭按钮和输入框交互优化,确保流畅使用体验
- 代码结构和样式规范化,保持界面美观一致
This commit is contained in:
2026-05-01 11:33:22 +08:00
parent d66a8dfe8c
commit 4d3503f47e
3 changed files with 487 additions and 8 deletions

View File

@@ -195,9 +195,9 @@
<u-button icon="map" type="error" text="预约看房" disabled
@click="$push('sub_pages/checkout/checkout?id=' + form.houseId)"></u-button>
</view> -->
<view class="item">
<!-- <u-button icon="phone" type="primary" text="电话咨询"></u-button> -->
<!-- <u-button icon="phone" type="primary" text="电话咨询" @click="makePhoneCall()"></u-button> -->
<view class="item" @click="openAIChat">
<u-icon name="chat" size="28" color="#3f72f4"></u-icon>
<text style="color: #3f72f4;">AI找房</text>
</view>
</view>
@@ -224,6 +224,8 @@
:apiCall="posterPreviewApiCall"
:apiParam="{}"
/>
<!-- AI找房对话弹窗 -->
<AiChatPopup v-model="showAIChat" :houseInfo="form" :houseId="houseId" />
</view>
</template>
@@ -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) {