This commit is contained in:
2026-07-30 15:41:06 +08:00
parent 4d3503f47e
commit d3e7f5a639
13 changed files with 1951 additions and 347 deletions

3
.idea/UniappTool.xml generated
View File

@@ -4,9 +4,12 @@
<option name="basePath" value="$PROJECT_DIR$" />
<option name="generalBasePath" value="$PROJECT_DIR$" />
<option name="manifestPath" value="$PROJECT_DIR$/manifest.json" />
<option name="manifestStamp" value="0" />
<option name="pagesPath" value="$PROJECT_DIR$/pages.json" />
<option name="scanNum" value="1" />
<option name="type" value="store" />
<option name="uniapp" value="true" />
<option name="uniappHx" value="true" />
<option name="wxAppId" value="wxee70307312db107a" />
</component>
</project>

View File

@@ -0,0 +1,125 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="class" />
<item index="1" class="java.lang.String" itemvalue="style" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="100">
<item index="0" class="java.lang.String" itemvalue="nobr" />
<item index="1" class="java.lang.String" itemvalue="noembed" />
<item index="2" class="java.lang.String" itemvalue="comment" />
<item index="3" class="java.lang.String" itemvalue="noscript" />
<item index="4" class="java.lang.String" itemvalue="embed" />
<item index="5" class="java.lang.String" itemvalue="script" />
<item index="6" class="java.lang.String" itemvalue="el-form" />
<item index="7" class="java.lang.String" itemvalue="el-input" />
<item index="8" class="java.lang.String" itemvalue="el-form-item" />
<item index="9" class="java.lang.String" itemvalue="el-button" />
<item index="10" class="java.lang.String" itemvalue="el-container" />
<item index="11" class="java.lang.String" itemvalue="el-header" />
<item index="12" class="java.lang.String" itemvalue="el-menu" />
<item index="13" class="java.lang.String" itemvalue="el-menu-item" />
<item index="14" class="java.lang.String" itemvalue="el-submenu" />
<item index="15" class="java.lang.String" itemvalue="el-breadcrumb" />
<item index="16" class="java.lang.String" itemvalue="el-breadcrumb-item" />
<item index="17" class="java.lang.String" itemvalue="el-dialog" />
<item index="18" class="java.lang.String" itemvalue="el-row" />
<item index="19" class="java.lang.String" itemvalue="el-col" />
<item index="20" class="java.lang.String" itemvalue="el-table-column" />
<item index="21" class="java.lang.String" itemvalue="el-table" />
<item index="22" class="java.lang.String" itemvalue="el-pagination" />
<item index="23" class="java.lang.String" itemvalue="el-upload" />
<item index="24" class="java.lang.String" itemvalue="el-select" />
<item index="25" class="java.lang.String" itemvalue="el-option" />
<item index="26" class="java.lang.String" itemvalue="el-date-picker" />
<item index="27" class="java.lang.String" itemvalue="el-switch" />
<item index="28" class="java.lang.String" itemvalue="u-swiper" />
<item index="29" class="java.lang.String" itemvalue="u-image" />
<item index="30" class="java.lang.String" itemvalue="u-button" />
<item index="31" class="java.lang.String" itemvalue="web-view" />
<item index="32" class="java.lang.String" itemvalue="u-avatar" />
<item index="33" class="java.lang.String" itemvalue="u-text" />
<item index="34" class="java.lang.String" itemvalue="u-grid" />
<item index="35" class="java.lang.String" itemvalue="u-grid-item" />
<item index="36" class="java.lang.String" itemvalue="u-icon" />
<item index="37" class="java.lang.String" itemvalue="u-cell-group" />
<item index="38" class="java.lang.String" itemvalue="u-cell" />
<item index="39" class="java.lang.String" itemvalue="u-tabs" />
<item index="40" class="java.lang.String" itemvalue="u-gap" />
<item index="41" class="java.lang.String" itemvalue="scroll-view" />
<item index="42" class="java.lang.String" itemvalue="u-toast" />
<item index="43" class="java.lang.String" itemvalue="u-subsection" />
<item index="44" class="java.lang.String" itemvalue="u-empty" />
<item index="45" class="java.lang.String" itemvalue="u-popup" />
<item index="46" class="java.lang.String" itemvalue="uqrcode" />
<item index="47" class="java.lang.String" itemvalue="temlate" />
<item index="48" class="java.lang.String" itemvalue="el-tree" />
<item index="49" class="java.lang.String" itemvalue="el-card" />
<item index="50" class="java.lang.String" itemvalue="el-tag" />
<item index="51" class="java.lang.String" itemvalue="u-modal" />
<item index="52" class="java.lang.String" itemvalue="rich-text" />
<item index="53" class="java.lang.String" itemvalue="u--text" />
<item index="54" class="java.lang.String" itemvalue="u-line-progress" />
<item index="55" class="java.lang.String" itemvalue="u--image" />
<item index="56" class="java.lang.String" itemvalue="page" />
<item index="57" class="java.lang.String" itemvalue="el-aside" />
<item index="58" class="java.lang.String" itemvalue="house" />
<item index="59" class="java.lang.String" itemvalue="el-dropdown" />
<item index="60" class="java.lang.String" itemvalue="arrowdown" />
<item index="61" class="java.lang.String" itemvalue="el-dropdown-menu" />
<item index="62" class="java.lang.String" itemvalue="caretleft" />
<item index="63" class="java.lang.String" itemvalue="close" />
<item index="64" class="java.lang.String" itemvalue="fold" />
<item index="65" class="java.lang.String" itemvalue="expand" />
<item index="66" class="java.lang.String" itemvalue="caretright" />
<item index="67" class="java.lang.String" itemvalue="upload" />
<item index="68" class="java.lang.String" itemvalue="el-cascader" />
<item index="69" class="java.lang.String" itemvalue="u-search" />
<item index="70" class="java.lang.String" itemvalue="u-scroll-list" />
<item index="71" class="java.lang.String" itemvalue="u-navbar" />
<item index="72" class="java.lang.String" itemvalue="u-loadmore" />
<item index="73" class="java.lang.String" itemvalue="u-parse" />
<item index="74" class="java.lang.String" itemvalue="u-number-box" />
<item index="75" class="java.lang.String" itemvalue="u-tag" />
<item index="76" class="java.lang.String" itemvalue="u-checkbox" />
<item index="77" class="java.lang.String" itemvalue="u-checkbox-group" />
<item index="78" class="java.lang.String" itemvalue="checkbox" />
<item index="79" class="java.lang.String" itemvalue="u-action-sheet" />
<item index="80" class="java.lang.String" itemvalue="u-line" />
<item index="81" class="java.lang.String" itemvalue="u-count-to" />
<item index="82" class="java.lang.String" itemvalue="u-swipe-action" />
<item index="83" class="java.lang.String" itemvalue="u-swipe-action-item" />
<item index="84" class="java.lang.String" itemvalue="u-form" />
<item index="85" class="java.lang.String" itemvalue="u-form-item" />
<item index="86" class="java.lang.String" itemvalue="u-input" />
<item index="87" class="java.lang.String" itemvalue="u-switch" />
<item index="88" class="java.lang.String" itemvalue="u-textarea" />
<item index="89" class="java.lang.String" itemvalue="u-picker" />
<item index="90" class="java.lang.String" itemvalue="u-sticky" />
<item index="91" class="java.lang.String" itemvalue="el-popover" />
<item index="92" class="java.lang.String" itemvalue="plus" />
<item index="93" class="java.lang.String" itemvalue="el-input-number" />
<item index="94" class="java.lang.String" itemvalue="el-checkbox" />
<item index="95" class="java.lang.String" itemvalue="el-checkbox-group" />
<item index="96" class="java.lang.String" itemvalue="el-radio-group" />
<item index="97" class="java.lang.String" itemvalue="el-radio-button" />
<item index="98" class="java.lang.String" itemvalue="el-collapse" />
<item index="99" class="java.lang.String" itemvalue="el-collapse-item" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
</profile>
</component>

90
.idea/workspace.xml generated
View File

@@ -5,7 +5,13 @@
</component>
<component name="ChangeListManager">
<list default="true" id="ec5c6cc2-d0e3-4470-b342-660aa89effe0" name="Changes" comment="feat(house): 优化房源区域选择及删除功能&#10;&#10;- 保存按钮布局调整优化,提升用户体验&#10;- 房源详情地区显示只展示市级,简化展示信息&#10;- 地区选择器调整,只显示市,确保区域数据统一&#10;- 删除房源操作添加确认弹窗,避免误删&#10;- 省市区数据加载逻辑简化,使用固定城区列表替代异步接口请求&#10;- 替换首页及闪屏logo图片更新为新资源路径&#10;- 隐藏房源详情页电话咨询按钮,暂不支持电话功能&#10;- 代码格式和注释优化,提升代码可读性">
<change afterPath="$PROJECT_DIR$/static/chat.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/UniappTool.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/UniappTool.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/api/config.js" beforeDir="false" afterPath="$PROJECT_DIR$/api/config.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/manifest.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages.json" beforeDir="false" afterPath="$PROJECT_DIR$/pages.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/index/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/sub_pages/house/detail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/sub_pages/house/detail.vue" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@@ -13,9 +19,75 @@
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="EmbeddingIndexingInfo">
<option name="cachedIndexableFilesCount" value="1126" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="McpProjectServerCommands">
<commands />
<urls />
</component>
<component name="NextEditCompletionFeaturesState">
<decayedCancelled>
<entry key="MS100" value="1.0012975447403287" />
<entry key="MS500" value="1.2646210987187831" />
<entry key="S2" value="1.717226152581449" />
<entry key="S5" value="1.8755126931127535" />
<entry key="S10" value="1.9356883525580264" />
<entry key="S30" value="1.9780860717730389" />
<entry key="S60" value="1.9889823414869645" />
<entry key="M2" value="1.994475912974751" />
<entry key="M5" value="1.997786884155309" />
<entry key="M10" value="2.0004008498666925" />
<entry key="M15" value="2.0303582434115346" />
<entry key="M30" value="2.6740968291758316" />
<entry key="H1" value="5.239000083953106" />
<entry key="H2" value="9.171162123556215" />
<entry key="H4" value="12.700802888856837" />
<entry key="D1" value="16.96029915706538" />
<entry key="W1" value="17.847103886950524" />
</decayedCancelled>
<decayedSelected>
<entry key="MS100" value="1.3559283531136527E-10" />
<entry key="MS500" value="0.01062789728442152" />
<entry key="S2" value="0.3210789522473564" />
<entry key="S5" value="0.6348114257123603" />
<entry key="S10" value="0.7967505417082315" />
<entry key="S30" value="0.9270591736770922" />
<entry key="S60" value="0.9628391213889744" />
<entry key="M2" value="0.9812436605598909" />
<entry key="M5" value="0.9924548206694935" />
<entry key="M10" value="0.9962202671445175" />
<entry key="M15" value="0.9974785880482416" />
<entry key="M30" value="0.9987384983308902" />
<entry key="H1" value="0.9993690501165674" />
<entry key="H2" value="0.9996844752803593" />
<entry key="H4" value="0.9998422251937349" />
<entry key="D1" value="0.9999737024701163" />
<entry key="W1" value="0.9999962431676754" />
</decayedSelected>
<decayedShown>
<entry key="MS100" value="0.034524517123180345" />
<entry key="MS500" value="0.6663187195740679" />
<entry key="S2" value="1.6640007914926087" />
<entry key="S5" value="2.2809829453222945" />
<entry key="S10" value="2.596343073079391" />
<entry key="S30" value="2.8538830002741933" />
<entry key="S60" value="2.9253693065627653" />
<entry key="M2" value="2.962281389354669" />
<entry key="M5" value="2.9848146242401454" />
<entry key="M10" value="2.993898404488965" />
<entry key="M15" value="3.026013940207783" />
<entry key="M30" value="3.6718649461917234" />
<entry key="H1" value="6.237777539663185" />
<entry key="H2" value="10.170474296712692" />
<entry key="H4" value="13.700425936362723" />
<entry key="D1" value="17.96022986507352" />
<entry key="W1" value="18.84709379854256" />
</decayedShown>
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 0
}</component>
@@ -26,11 +98,15 @@
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.MCP Project settings loaded&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;RunOnceActivity.typescript.service.memoryLimit.init&quot;: &quot;true&quot;,
&quot;codeWithMe.voiceChat.enabledByDefault&quot;: &quot;false&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;/Users/gxwebsoft/APP/anshangjia-uniapp&quot;,
&quot;last_opened_file_path&quot;: &quot;/Users/liangxin/Project/Html/miniProgram/aishangjia-uniapp/static&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
@@ -39,18 +115,20 @@
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;to.speed.mode.migration.done&quot;: &quot;true&quot;,
&quot;ts.external.directory.path&quot;: &quot;/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;,
&quot;wxn.project&quot;: &quot;true&quot;
}
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/static" />
<recent name="$PROJECT_DIR$/api" />
</key>
</component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-js-predefined-d6986cc7102b-e03c56caf84a-JavaScript-WS-252.23892.411" />
<option value="bundled-js-predefined-d6986cc7102b-31caf2ab9e3c-JavaScript-WS-261.24374.125" />
</set>
</attachedChunks>
</component>
@@ -78,6 +156,12 @@
<workItem from="1775219711691" duration="2835000" />
<workItem from="1775277870399" duration="755000" />
<workItem from="1777604110578" duration="1501000" />
<workItem from="1779100285662" duration="4953000" />
<workItem from="1780307080581" duration="5954000" />
<workItem from="1780382025019" duration="15000" />
<workItem from="1782396830877" duration="2578000" />
<workItem from="1782467253730" duration="5646000" />
<workItem from="1783071360397" duration="2151000" />
</task>
<task id="LOCAL-00001" summary="爱尚家接口合并到cms-api.websoft.top">
<option name="closed" value="true" />

View File

@@ -13,6 +13,7 @@ module.exports = {
// 生产环境
serverUrl: 'https://server.websoft.top/api',
apiUrl: 'https://cms-api.websoft.top/api',
// apiUrl: 'http://127.0.0.1:9200/api',
socketUrl: 'wss://server.websoft.top',
// fileUrl: 'https://oss.jimeigroup.cn',

8
api/house-ai-chat.js Normal file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// AI找房问答
export const sendHouseAiMessage = (data) => http.post('/house/ai-chat/message', data)
export default {
sendHouseAiMessage
}

8
api/house-ai-config.js Normal file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 获取当前租户AI配置
export const getCurrentHouseAiConfig = () => http.get('/house/ai-config/current')
export default {
getCurrentHouseAiConfig
}

8
api/house-message.js Normal file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 新增AI找房留言
export const addHouseMessage = (data) => http.post('/house/house-message', data)
export default {
addHouseMessage
}

View File

@@ -5,6 +5,7 @@
"versionName" : "2.0.6",
"versionCode" : 206,
"transformPx" : false,
"sassImplementationName" : "node-sass",
/* 5+App */
"app-plus" : {
"usingComponents" : true,

View File

@@ -121,6 +121,13 @@
"navigationBarTitleText": "搜索"
}
},
{
"path": "pages/ai-house/index",
"style": {
"navigationBarTitleText": "AI找房",
"enablePullDownRefresh": false
}
},
{
"path": "pages/login/index",
"style": {
@@ -187,4 +194,4 @@
"easycom": {
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
}
}
}

1212
pages/ai-house/index.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,351 +1,505 @@
<template>
<view class="page">
<u-navbar placeholder fixed>
<template slot="left">
<view style="display: flex;align-items: center;height: 44px;">
<image style="height: 30px;" src="@/static/logo-chang.jpg" mode="heightFix"></image>
</view>
</template>
</u-navbar>
<!-- 搜索 -->
<u-sticky :offset-top="stickyTop" zIndex="999">
<view class="search-fix fixed" v-if="scrollTop < 30">
<view class="search">
<u-notice-bar bgColor="#ffffff" direction="column" :text="hotKeywords" speed="250" @click="onNoticeBar"></u-notice-bar>
<!-- <uni-data-select class="select-width" v-model="where.region" :localdata="region"
placeholder="所在区域"></uni-data-select> -->
<view class="input">
<u-search placeholder="您想找哪里" bgColor="#ffffff" v-model="where.keywords" :showAction="false" :animation="true" @search="onSearch"></u-search>
</view>
</view>
</view>
<view class="search-fix" v-else>
<view class="search">
<u-notice-bar bgColor="#ffffff" direction="column" :text="hotKeywords" speed="250"></u-notice-bar>
<!-- <uni-data-select class="select-width" v-model="where.region" :localdata="region"
placeholder="所在区域"></uni-data-select> -->
<view class="input">
<u-search placeholder="您想找哪里" bgColor="#ffffff" v-model="where.keywords" :showAction="false" :animation="true" @search="onSearch"></u-search>
</view>
</view>
</view>
</u-sticky>
<!-- 幻灯片 -->
<view class="swiper">
<u-swiper :list="swiperList" :height="180" :radius="0" @click="click"></u-swiper>
</view>
<!-- 选项卡 -->
<view class="tabs">
<u-tabs :list="menu" @click="onClick"></u-tabs>
</view>
<uv-waterfall ref="waterfall" v-model="list" left-gap="10" right-gap="10" column-gap="8"
@changeList="changeList">
<!-- 第一列数据 -->
<template v-slot:list1>
<!-- 为了磨平部分平台的BUG必须套一层view -->
<view class="house-list">
<block v-for="(item,index) in list1" :key="index">
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
<image :src="item.files[0].url" mode="widthFix">
</image>
<view class="info">
<view class="title">{{ item.houseTitle }}</view>
<view class="desc"><text>{{ item.extent }}|{{ item.toward }}</text></view>
<view class="price">{{ item.monthlyRent }}/</view>
</view>
</view>
</block>
</view>
</template>
<!-- 第二列数据 -->
<template v-slot:list2>
<!-- 为了磨平部分平台的BUG必须套一层view -->
<view class="house-list">
<block v-for="(item,index) in list2" :key="index">
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
<image :src="item.files[0].url" mode="widthFix">
</image>
<view class="info">
<view class="title">{{ item.houseTitle }}</view>
<view class="desc"><text>{{ item.extent }}|{{ item.toward }}</text></view>
<view class="price">{{ item.monthlyRent }}/</view>
</view>
</view>
</block>
</view>
</template>
</uv-waterfall>
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="list.length == 0">
</u-empty>
<!-- <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="onScroll">
<view class="house-list" v-if="list.length > 0">
<block v-for="(item,index) in list" :key="index">
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
<image :src="item.files[0].url" mode="widthFix">
</image>
<view class="info">
<view class="title">{{ item.houseTitle }}</view>
<view class="desc"><text>{{ item.extent }}|{{ item.toward }}</text></view>
<view class="price">{{ item.rent }}/</view>
</view>
</view>
</block>
</view>
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="list.length == 0">
</u-empty>
</scroll-view> -->
</view>
<view class="page">
<u-navbar placeholder fixed>
<template slot="left">
<view style="display: flex;align-items: center;height: 44px;">
<image style="height: 30px;" src="@/static/logo-chang.jpg" mode="heightFix"></image>
</view>
</template>
</u-navbar>
<!-- 搜索 -->
<u-sticky :offset-top="stickyTop" zIndex="999">
<view class="search-fix fixed" v-if="scrollTop < 30">
<view class="search">
<u-notice-bar bgColor="#ffffff" direction="column" :text="hotKeywords" speed="250"
@click="onNoticeBar"></u-notice-bar>
<!-- <uni-data-select class="select-width" v-model="where.region" :localdata="region"
placeholder="所在区域"></uni-data-select> -->
<view class="input">
<u-search placeholder="您想找哪里" bgColor="#ffffff" v-model="where.keywords" :showAction="false"
:animation="true" @search="onSearch"></u-search>
</view>
</view>
</view>
<view class="search-fix" v-else>
<view class="search">
<u-notice-bar bgColor="#ffffff" direction="column" :text="hotKeywords" speed="250"></u-notice-bar>
<!-- <uni-data-select class="select-width" v-model="where.region" :localdata="region"
placeholder="所在区域"></uni-data-select> -->
<view class="input">
<u-search placeholder="您想找哪里" bgColor="#ffffff" v-model="where.keywords" :showAction="false"
:animation="true" @search="onSearch"></u-search>
</view>
</view>
</view>
</u-sticky>
<!-- 幻灯片 -->
<view class="swiper">
<u-swiper :list="swiperList" :height="180" :radius="0" @click="click"></u-swiper>
</view>
<view class="ai-entry" @click="goAiHouse">
<view class="ai-entry-left">
<image class="ai-avatar"
:src="aiEntryImage"
mode="aspectFill"></image>
<view class="ai-entry-text">
<view class="ai-entry-title">AI 找房</view>
<view class="ai-entry-desc">输入需求自动筛选匹配房源</view>
</view>
</view>
<view class="ai-entry-btn">AI找房</view>
</view>
<!-- 选项卡 -->
<view class="tabs">
<u-tabs :list="menu" @click="onClick"></u-tabs>
</view>
<uv-waterfall ref="waterfall" v-model="list" left-gap="10" right-gap="10" column-gap="8"
@changeList="changeList">
<!-- 第一列数据 -->
<template v-slot:list1>
<!-- 为了磨平部分平台的BUG必须套一层view -->
<view class="house-list">
<block v-for="(item,index) in list1" :key="index">
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
<image :src="item.files[0].url" mode="widthFix">
</image>
<view class="info">
<view class="title">{{ item.houseTitle }}</view>
<view class="desc">
<text>{{ item.extent }}|{{ item.toward }}</text>
</view>
<view class="price">{{ item.monthlyRent }}/</view>
</view>
</view>
</block>
</view>
</template>
<!-- 第二列数据 -->
<template v-slot:list2>
<!-- 为了磨平部分平台的BUG必须套一层view -->
<view class="house-list">
<block v-for="(item,index) in list2" :key="index">
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
<image :src="item.files[0].url" mode="widthFix">
</image>
<view class="info">
<view class="title">{{ item.houseTitle }}</view>
<view class="desc">
<text>{{ item.extent }}|{{ item.toward }}</text>
</view>
<view class="price">{{ item.monthlyRent }}/</view>
</view>
</view>
</block>
</view>
</template>
</uv-waterfall>
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="list.length == 0">
</u-empty>
<view class="ai-float-entry" v-if="showAiFloatEntry" @click="goAiHouse">
<image
class="ai-float-image"
:src="aiFloatImage"
mode="aspectFill"
></image>
</view>
<!-- <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="onScroll">
<view class="house-list" v-if="list.length > 0">
<block v-for="(item,index) in list" :key="index">
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
<image :src="item.files[0].url" mode="widthFix">
</image>
<view class="info">
<view class="title">{{ item.houseTitle }}</view>
<view class="desc"><text>{{ item.extent }}|{{ item.toward }}</text></view>
<view class="price">{{ item.rent }}/</view>
</view>
</view>
</block>
</view>
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="list.length == 0">
</u-empty>
</scroll-view> -->
</view>
</template>
<script>
import * as Util from '@/utils/util.js'
import store from '@/store'
import storage from '@/utils/storage'
import * as DictApi from '@/api/dict.js'
import * as HouseInfoApi from '@/api/house-info.js'
import * as Util from '@/utils/util.js'
import store from '@/store'
import storage from '@/utils/storage'
import * as DictApi from '@/api/dict.js'
import * as HouseInfoApi from '@/api/house-info.js'
import * as HouseAiConfigApi from '@/api/house-ai-config.js'
const menu = [{
name: '推荐',
reset: true
},
{
name: '特价好房',
reset: false
}
];
const loginUserId = uni.getStorageSync('userId')
const DEFAULT_AI_ENTRY_IMAGE = 'https://oss.wsdns.cn/20260626/f5f7d5996e4f45ce8bb24c7c455d07d4.png?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90'
const DEFAULT_AI_FLOAT_IMAGE = 'https://oss.wsdns.cn/20260626/e666a52de6724578b6df007fcacbbe21.gif?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90'
const menu = [{
name: '为您推荐',
reset: true
},
{
name: '特价好房',
reset: false
}
];
const loginUserId = uni.getStorageSync('userId')
export default {
data() {
return {
list: [],
list1: [],
list2: [],
loadMore: true,
status: '加载更多',
page: 1,
where: {
recommend: 1,
status: 0
},
region: [],
// 控制onShow事件是否刷新订单列表
canReset: false,
disabled: false,
swiperList: [
'https://oss.wsdns.cn/20240708/9e1f58e7fc7b4bad92edd852ff34dbcb.png?x-oss-process=image/resize,w_750/quality,Q_90',
'https://oss.wsdns.cn/20240708/c95838b78b5746eb934daffb12a2efdc.png?x-oss-process=image/resize,w_750/quality,Q_90',
],
hotKeywords: [
'五象航洋城',
'富雅国际金融中心'
],
menu,
scrollTop: 0,
old: {
scrollTop: 0
},
stickyTop: 60
};
export default {
data() {
return {
list: [],
list1: [],
list2: [],
loadMore: true,
status: '加载更多',
page: 1,
where: {
recommend: 1,
status: 0
},
region: [],
// 控制onShow事件是否刷新订单列表
canReset: false,
disabled: false,
swiperList: [
'https://oss.wsdns.cn/20240708/9e1f58e7fc7b4bad92edd852ff34dbcb.png?x-oss-process=image/resize,w_750/quality,Q_90',
'https://oss.wsdns.cn/20240708/c95838b78b5746eb934daffb12a2efdc.png?x-oss-process=image/resize,w_750/quality,Q_90',
],
hotKeywords: [
'五象航洋城',
'富雅国际金融中心'
],
menu,
scrollTop: 0,
old: {
scrollTop: 0
},
stickyTop: 60,
aiEntryBottom: 0,
showAiFloatEntry: false,
aiEntryImage: DEFAULT_AI_ENTRY_IMAGE,
aiFloatImage: DEFAULT_AI_FLOAT_IMAGE
};
},
onLoad() {
this.getDict()
this.list = []
this.onRefreshList()
uni.$u.mpShare = {
title: '爱尚家找房'
}
uni.getSystemInfo({
success: (res) => {
this.stickyTop = res.statusBarHeight + 44 + 20
}
})
},
onShow() {},
onBackPress() {},
onUnload() {
},
onLoad() {
this.loadAiConfig()
this.getDict()
this.list = []
this.onRefreshList()
uni.$u.mpShare = {
title: '爱尚家找房'
}
},
onPageScroll(e) {
this.scrollTop = e.scrollTop
},
// 触底函数
onReachBottom() {
console.log("触底函数: ");
const app = this
if (app.loadMore) {
app.page = ++app.page;
app.onRefreshList()
}
},
methods: {
changeList(e) {
this[e.name].push(e.value);
},
getDict() {
DictApi.getDictionaryOptions({
dictCode: 'region'
}).then(res => {
this.region = res.data.map(d => {
return {
value: d.dictDataCode,
text: d.dictDataName
}
})
})
},
onRefreshList() {
const app = this
const userId = uni.getStorageSync('userId')
app.where.page = app.page
return new Promise((resolve, reject) => {
HouseInfoApi.pageHouseInfo(app.where)
.then(result => {
const list = result.data.list.map(d => {
d.files = JSON.parse(d.files) || []
return d
})
// 合并新数据
app.list.push.apply(app.list,list);
if (result.data.count > app.list.length) {
app.canReset = true
} else {
app.canReset = false
}
resolve(list)
})
})
},
onClick(e){
const index = e.index
this.where = {}
if(index == 0){
this.where.recommend = 1
this.where.status = 0
}
if(index == 1){
this.where.mustSee = 1
this.where.status = 0
}
this.onSearch()
},
onNoticeBar(index){
// console.log('this.hotKeywords[index]: ',this.hotKeywords[index]);
this.where.keywords = this.hotKeywords[index]
this.onSearch()
},
onSearch() {
this.list = [];
this.$refs.waterfall.clear();
this.list1 = [];
this.list2 = [];
this.page = 1
this.onRefreshList()
// this.$push('/sub_pages/member/member', this.where)
},
},
watch: {
uni.getSystemInfo({
success: (res) => {
this.stickyTop = res.statusBarHeight + 44 + 20
}
})
},
onShow() {
},
onReady() {
this.$nextTick(() => {
setTimeout(() => {
this.updateAiEntryPosition()
}, 300)
})
},
onBackPress() {
},
onUnload() {
}
};
},
onPageScroll(e) {
this.scrollTop = e.scrollTop
this.updateAiFloatEntry()
},
// 触底函数
onReachBottom() {
console.log("触底函数: ");
const app = this
if (app.loadMore) {
app.page = ++app.page;
app.onRefreshList()
}
},
methods: {
changeList(e) {
this[e.name].push(e.value);
},
getDict() {
DictApi.getDictionaryOptions({
dictCode: 'region'
}).then(res => {
this.region = res.data.map(d => {
return {
value: d.dictDataCode,
text: d.dictDataName
}
})
})
},
async loadAiConfig() {
try {
const result = await HouseAiConfigApi.getCurrentHouseAiConfig()
const data = result && result.data ? result.data : result
this.aiEntryImage = data?.aiEntryImage || DEFAULT_AI_ENTRY_IMAGE
this.aiFloatImage = data?.aiFloatImage || DEFAULT_AI_FLOAT_IMAGE
} catch (error) {
this.aiEntryImage = DEFAULT_AI_ENTRY_IMAGE
this.aiFloatImage = DEFAULT_AI_FLOAT_IMAGE
}
},
onRefreshList() {
const app = this
const userId = uni.getStorageSync('userId')
app.where.page = app.page
return new Promise((resolve, reject) => {
HouseInfoApi.pageHouseInfo(app.where)
.then(result => {
const list = result.data.list.map(d => {
d.files = JSON.parse(d.files) || []
return d
})
// 合并新数据
app.list.push.apply(app.list, list);
if (result.data.count > app.list.length) {
app.canReset = true
} else {
app.canReset = false
}
resolve(list)
})
})
},
onClick(e) {
const index = e.index
this.where = {}
if (index == 0) {
this.where.recommend = 1
this.where.status = 0
}
if (index == 1) {
this.where.mustSee = 1
this.where.status = 0
}
this.onSearch()
},
onNoticeBar(index) {
// console.log('this.hotKeywords[index]: ',this.hotKeywords[index]);
this.where.keywords = this.hotKeywords[index]
this.onSearch()
},
goAiHouse() {
uni.navigateTo({
url: '/pages/ai-house/index'
})
},
updateAiEntryPosition() {
uni.createSelectorQuery()
.in(this)
.select('.ai-entry')
.boundingClientRect(rect => {
if (!rect) return
this.aiEntryBottom = rect.top + rect.height + this.scrollTop
this.updateAiFloatEntry()
})
.exec()
},
updateAiFloatEntry() {
this.showAiFloatEntry = this.aiEntryBottom > 0 && this.scrollTop >= this.aiEntryBottom
},
onSearch() {
this.list = [];
this.$refs.waterfall.clear();
this.list1 = [];
this.list2 = [];
this.page = 1
this.onRefreshList()
// this.$push('/sub_pages/member/member', this.where)
},
},
watch: {}
};
</script>
<style lang="scss" scoped>
.page {
.search-fix {
width: 600rpx;
margin: auto;
background-color: #ffffff;
display: flex;
border-radius: 100rpx;
box-shadow: 0 3rpx 10rpx 0px #cccccc;
.page {
.search-fix {
width: 600rpx;
margin: auto;
background-color: #ffffff;
display: flex;
border-radius: 100rpx;
box-shadow: 0 3rpx 10rpx 0px #cccccc;
.search {
width: 580rpx;
margin: 15rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
.search {
width: 580rpx;
margin: 15rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
.region {
width: 170rpx;
color: #666666;
font-size: 28rpx;
}
.input{
width: 330rpx;
}
}
}
.region {
width: 170rpx;
color: #666666;
font-size: 28rpx;
}
.fixed {
position: fixed;
top: 300rpx;
left: 75rpx;
}
.input {
width: 330rpx;
}
}
}
.no-fixed {
position: absolute;
top: 0rpx;
left: 75rpx;
}
.fixed {
position: fixed;
top: 300rpx;
left: 75rpx;
}
.tabs {
margin-top: 80rpx;
}
.no-fixed {
position: absolute;
top: 0rpx;
left: 75rpx;
}
.house-list {
// width: 700rpx;
// margin: 20rpx auto;
// display: flex;
// flex-wrap: wrap;
// justify-content: space-between;
.tabs {
//margin-top: 80rpx;
}
.item {
margin-bottom: 40rpx;
border-radius: 20rpx;
// box-shadow: 0 3rpx 10rpx 0px #cccccc;
background-color: #ffffff;
width: 338rpx;
.ai-entry {
width: calc(100% - 88rpx);
margin: 26rpx 20rpx;
padding: 22rpx 24rpx;
border-radius: 999rpx;
border: 2rpx solid transparent;
background: #ffffff;
background-origin: border-box;
background-clip: padding-box;
background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #4f7cff, #32c5a6);
background-clip: padding-box, border-box;
box-shadow: 0 10rpx 28rpx rgba(63, 114, 244, 0.12);
display: flex;
align-items: center;
justify-content: space-between;
image {
border-radius: 20rpx 20rpx 0 0;
height: 420rpx;
width: 338rpx;
}
.ai-entry-left {
display: flex;
align-items: center;
}
.info {
padding: 20rpx 20rpx;
display: flex;
flex-direction: column;
.ai-avatar {
width: 92rpx;
height: 92rpx;
border-radius: 50%;
background: #ffffff;
flex-shrink: 0;
}
.title {
font-size: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden; //溢出内容隐藏
text-overflow: ellipsis; //文本溢出部分用省略号表示
display: -webkit-box; //特别显示模式
-webkit-line-clamp: 2; //行数
line-clamp: 2;
-webkit-box-orient: vertical; //盒子中内容竖直排列
}
.ai-entry-text {
margin-left: 18rpx;
display: flex;
flex-direction: column;
.desc {
color: #999999;
font-size: 28rpx;
}
.ai-entry-title {
font-size: 32rpx;
font-weight: 600;
color: #1f2a37;
}
.price {
color: #ff0000;
font-size: 30rpx;
}
}
}
}
}
.select-width{
width: 200rpx;
}
</style>
.ai-entry-desc {
margin-top: 8rpx;
font-size: 24rpx;
color: #667085;
}
}
.ai-entry-btn {
min-width: 160rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
color: #ffffff;
font-size: 28rpx;
font-weight: 600;
border-radius: 999rpx;
background: linear-gradient(to right, #3f72f4, #7a9cf3);
box-shadow: 0 10rpx 20rpx rgba(63, 114, 244, 0.22);
}
}
.ai-float-entry {
position: fixed;
right: 28rpx;
bottom: calc(48rpx + env(safe-area-inset-bottom));
z-index: 1000;
width: 132rpx;
height: 132rpx;
border-radius: 50%;
overflow: hidden;
background: #ffffff;
box-shadow: 0 12rpx 32rpx rgba(31, 42, 55, 0.2);
}
.ai-float-image {
display: block;
width: 132rpx;
height: 132rpx;
}
.house-list {
// width: 700rpx;
// margin: 20rpx auto;
// display: flex;
// flex-wrap: wrap;
// justify-content: space-between;
.item {
margin-bottom: 40rpx;
border-radius: 20rpx;
// box-shadow: 0 3rpx 10rpx 0px #cccccc;
background-color: #ffffff;
width: 338rpx;
image {
border-radius: 20rpx 20rpx 0 0;
height: 420rpx;
width: 338rpx;
}
.info {
padding: 20rpx 20rpx;
display: flex;
flex-direction: column;
.title {
font-size: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden; //溢出内容隐藏
text-overflow: ellipsis; //文本溢出部分用省略号表示
display: -webkit-box; //特别显示模式
-webkit-line-clamp: 2; //行数
line-clamp: 2;
-webkit-box-orient: vertical; //盒子中内容竖直排列
}
.desc {
color: #999999;
font-size: 28rpx;
}
.price {
color: #ff0000;
font-size: 30rpx;
}
}
}
}
}
.select-width {
width: 200rpx;
}
</style>

BIN
static/chat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -195,7 +195,7 @@
<u-button icon="map" type="error" text="预约看房" disabled
@click="$push('sub_pages/checkout/checkout?id=' + form.houseId)"></u-button>
</view> -->
<view class="item" @click="openAIChat">
<view class="item" @click="goAiHouse">
<u-icon name="chat" size="28" color="#3f72f4"></u-icon>
<text style="color: #3f72f4;">AI找房</text>
</view>
@@ -224,8 +224,6 @@
:apiCall="posterPreviewApiCall"
:apiParam="{}"
/>
<!-- AI找房对话弹窗 -->
<AiChatPopup v-model="showAIChat" :houseInfo="form" :houseId="houseId" />
</view>
</template>
@@ -240,7 +238,6 @@
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: '推荐',
@@ -350,8 +347,7 @@
components: {
ShareSheet,
HousePosterGenerator,
GoodsPosterPopup,
AiChatPopup
GoodsPosterPopup
},
data() {
return {
@@ -397,9 +393,7 @@
showPosterPreview: false,
currentPosterUrl: '',
dealerId: 0,
mobile: '',
// AI找房弹窗
showAIChat: false
mobile: ''
};
},
@@ -809,12 +803,11 @@
})
},
// AI找房打开对话弹窗
openAIChat() {
console.log('openAIChat called, showAIChat before:', this.showAIChat)
this.showAIChat = true
console.log('showAIChat after:', this.showAIChat)
},
goAiHouse() {
uni.navigateTo({
url: '/pages/ai-house/index'
})
},
// 下载海报图片
downloadPosterImage(imageUrl) {