diff --git a/packages/community/choseCommunity/index.vue b/packages/community/choseCommunity/index.vue index abe7c359..9136109c 100644 --- a/packages/community/choseCommunity/index.vue +++ b/packages/community/choseCommunity/index.vue @@ -4,49 +4,34 @@
{{ city.region }}
切换城市 - +
-
+
{{ item.name }}
{{ item.addr }}
- + +
- + 未找到相关信息的小区
@@ -72,28 +57,20 @@
-
+
{{ item.label }}
- + 未找到相关信息的楼栋
@@ -101,29 +78,21 @@
-
+
{{ item.label }}
- + 未找到相关信息的楼层
@@ -131,29 +100,21 @@
-
+
{{ item.label }}
- + 未找到相关信息的房间
@@ -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() { }, };