From c93aac0aa9b9bf30df22a3cc01fc76a24f2b362c Mon Sep 17 00:00:00 2001 From: weicw Date: Fri, 31 Jul 2026 20:21:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(ai-house):=20=E9=87=8D=E6=9E=84=E6=89=BE?= =?UTF-8?q?=E6=88=BF=E8=81=8A=E5=A4=A9=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/house-ai-chat.js | 10 +- pages/ai-house/index.vue | 332 +++++++++++++++++++------------------ sub_pages/house/detail.vue | 13 ++ 3 files changed, 195 insertions(+), 160 deletions(-) diff --git a/api/house-ai-chat.js b/api/house-ai-chat.js index 133ccde..6bc8a5c 100644 --- a/api/house-ai-chat.js +++ b/api/house-ai-chat.js @@ -3,6 +3,14 @@ import http from './index.js'; // AI找房问答 export const sendHouseAiMessage = (data) => http.post('/house/ai-chat/message', data) +// 清空当前AI找房会话 +export const clearHouseAiSession = (data) => http.post('/house/ai-chat/session/clear', data) + +// 无候选时提交找房咨询线索 +export const submitHouseAiLead = (data) => http.post('/house/house-message/ai-agent', data) + export default { - sendHouseAiMessage + sendHouseAiMessage, + clearHouseAiSession, + submitHouseAiLead } diff --git a/pages/ai-house/index.vue b/pages/ai-house/index.vue index 910be8a..b33c8e5 100644 --- a/pages/ai-house/index.vue +++ b/pages/ai-house/index.vue @@ -33,43 +33,26 @@ 您想要找什么样的房型? 多少平方 - + 多少楼层 - + 多少租金 - + 什么地段 - + + + + {{ loading ? '提交中...' : '提交找房需求' }} @@ -164,13 +147,14 @@ class="house-card" @click="goHouseDetail(item)" > - + + {{ item.houseTitle }} {{ item.matchReason }} {{ item.address || item.region || item.city || '位置待补充' }} {{ item.extent }}m²|{{ item.toward }} - {{ item.monthlyRent }}元/月 + {{ item.monthlyRent ? item.monthlyRent + '元/月' : (item.totalPrice || item.salePrice || '价格待确认') }} @@ -189,6 +173,7 @@ + {{ progressText || '正在处理中' }} @@ -196,15 +181,24 @@ - + 找房 + + {{ item.label }} +