Compare commits

...

2 Commits

Author SHA1 Message Date
赵毅
847c1701f8 优化选择房产之后的提示的数据 2025-08-12 17:27:52 +08:00
赵毅
f44adc7721 修改首页功能导航区的显示逻辑 2025-08-12 17:15:58 +08:00
4 changed files with 42 additions and 77 deletions

View File

@ -4,49 +4,34 @@
<div class="currentAdd_left">{{ city.region }}</div>
<div class="currentAdd_right" @click="changeAddress">
切换城市
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_choseAddress.png"
></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_choseAddress.png"></image>
</div>
</div>
<div class="communityBox" v-if="step == 1">
<div class="search">
<input
type="text"
placeholder="请输入小区名称"
v-model="communityName"
/>
<image
@click="searchByName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
<input type="text" placeholder="请输入小区名称" v-model="communityName" />
<image @click="searchByName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div>
<!-- @click="chooseCommunity(item)" -->
<div class="communityList">
<div
class="communityItem"
v-for="item in communityList"
:key="item.community_id"
@click="nextStep(item)"
>
<div class="communityItem" v-for="item in communityList" :key="item.community_id" @click="nextStep(item)">
<div class="communityItem_left">
<div class="communityItem_tit">{{ item.name }}</div>
<div class="communityItem_address">{{ item.addr }}</div>
</div>
<div class="communityItem_right">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communityMore.png"
></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communityMore.png">
</image>
</div>
</div>
</div>
<div class="empty" v-if="communityList.length == 0">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"
></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
<span>未找到相关信息的小区</span>
</div>
</div>
@ -72,28 +57,20 @@
<div class="communityBox" v-if="step == 2">
<div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入楼栋名称" />
<image
@click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
<image @click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div>
<div class="floorList">
<div
@click="nextStep(item, index)"
:class="{ active: index === selectedFloorIndex }"
class="floorItem"
v-for="(item, index) in filteredFloorsList"
:key="index"
>
<div @click="nextStep(item, index)" :class="{ active: index === selectedFloorIndex }" class="floorItem"
v-for="(item, index) in filteredFloorsList" :key="index">
{{ item.label }}
</div>
</div>
<div class="empty" v-if="filteredFloorsList.length === 0">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"
></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
<span>未找到相关信息的楼栋</span>
</div>
</div>
@ -101,29 +78,21 @@
<div class="communityBox" v-if="step == 3">
<div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入楼层名称" />
<image
@click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
<image @click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div>
<div class="roomList">
<!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> -->
<div
@click="nextStep(item, index, 'room')"
:class="{ active2: index === selectedRoomIndex }"
class="roomItem"
v-for="(item, index) in filteredFloorsList"
:key="index"
>
<div @click="nextStep(item, index, 'room')" :class="{ active2: index === selectedRoomIndex }" class="roomItem"
v-for="(item, index) in filteredFloorsList" :key="index">
{{ item.label }}
</div>
</div>
<div class="empty" v-if="filteredFloorsList.length === 0">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"
></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
<span>未找到相关信息的楼层</span>
</div>
</div>
@ -131,29 +100,21 @@
<div class="communityBox" v-if="step == 4">
<div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入房间名称" />
<image
@click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
></image>
<image @click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div>
<div class="roomList">
<!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> -->
<div
@click="nextStep(item, index, 'room')"
:class="{ active2: index === selectedRoomIndex }"
class="roomItem"
v-for="(item, index) in filteredFloorsList"
:key="index"
>
<div @click="nextStep(item, index, 'room')" :class="{ active2: index === selectedRoomIndex }" class="roomItem"
v-for="(item, index) in filteredFloorsList" :key="index">
{{ item.label }}
</div>
</div>
<div class="empty" v-if="filteredFloorsList.length === 0">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"
></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
<span>未找到相关信息的房间</span>
</div>
</div>
@ -269,15 +230,15 @@ export default {
: "",
}).then((res) => {
//
if(this.step != 4) {
res.rows.sort((a, b) => {
//
const floorA = parseInt(a.label.replace(/[^\d]/g, ''));
const floorB = parseInt(b.label.replace(/[^\d]/g, ''));
return floorA - floorB;
});
}
this.filteredFloorsList = this.step == 4 ? this.filteredFloorsList : res.rows;
if (this.step != 4) {
res.rows.sort((a, b) => {
//
const floorA = parseInt(a.label.replace(/[^\d]/g, ''));
const floorB = parseInt(b.label.replace(/[^\d]/g, ''));
return floorA - floorB;
});
}
this.filteredFloorsList = this.step == 4 ? this.filteredFloorsList : res.rows;
this.searchList = res.rows;
this.searchQuery = "";
if (this.step == "1") {
@ -289,7 +250,7 @@ export default {
// this.floorsList = res.rows
} else if (this.step == "3") {
console.log(item.label);
this.fName = item.label;
this.fName = item.label.includes("层") ? item.label : item.label + "层";
// this.roomList = res.rows
this.step = "4";
} else {
@ -353,7 +314,7 @@ export default {
this.searchByName();
},
onReachBottom() {},
onReachBottom() { },
};
</script>

View File

@ -203,6 +203,7 @@ export default {
console.log("🚀 ~ onLoad ~ res.rows:", res.rows)
if (!uni.getStorageSync("changeCommData")) {
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
uni.setStorageSync("isShowNav", res.rows[0].room_owner_list[0].type)
}
this.communityList = res.rows;
});

View File

@ -79,6 +79,7 @@ export default {
this.currentCommunity = e
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
uni.setStorageSync('currentCommunityAddr',e.addr);
uni.setStorageSync("isShowNav", e.room_owner_list[0].type)
NavgateTo("1")
},
},

View File

@ -1001,6 +1001,8 @@ export default {
this.localHeight = meun.height;
this.showSearch()
this.getSearchVal()
this.showNav = uni.getStorageSync("isShowNav") == 1
},
onShow() {