From 4b072b16a1cb23f3de29767636b6423de57603f5 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 9 Oct 2024 14:54:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=83=AD=E7=82=B9bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/resiAndHouse/resiAndHouse.js | 43 ++++++++++++++++++++++++++-- pages/resiAndHouse/resiAndHouse.json | 3 +- pages/resiAndHouse/resiAndHouse.wxml | 11 +++++-- pages/resiAndHouse/resiAndHouse.wxss | 24 ++++++++++++++-- utils/api.js | 13 ++++++++- 5 files changed, 86 insertions(+), 8 deletions(-) diff --git a/pages/resiAndHouse/resiAndHouse.js b/pages/resiAndHouse/resiAndHouse.js index c70813b..c4b60e0 100644 --- a/pages/resiAndHouse/resiAndHouse.js +++ b/pages/resiAndHouse/resiAndHouse.js @@ -113,6 +113,8 @@ Page({ this.getAllOrgCategoryCount() this.getTableData() this.getTopTreeData() + this.hotResidentSearch() + this.hotHouseSearch() wx.loadFontFace({ family: 'PingFangSC-regular', source: 'url("https://img2.misssixty.com.cn/rs/lib/fonts/PingFangSC-regular.ttf")', @@ -259,6 +261,7 @@ Page({ angencyFwList: [{ ...res.data, children: arr }], angencyJmList:[{ ...res.data, children: arr }] }) + console.log(this.data.angencyFwList); }) }, getTreeFun(id, arr, data) { @@ -608,7 +611,7 @@ Page({ }) }) - await houseSearch({ ...this.data.params1, searchKey: this.data.keyWord }).then(res => { + await getCommunityHouse({ ...this.data.params1, searchKey: this.data.keyWord }).then(res => { const { code, data } = res; if (code == 0) { this.setData({ @@ -631,5 +634,41 @@ Page({ }) } }) - } + }, + hotResidentSearch(){ + api.hotResidentSearch().then(res=>{ + this.setData({ + resiSearch:res.data + }) + }).catch(err=>{ + + }) + }, + hotHouseSearch(){ + api.hotHouseSearch().then(res=>{ + this.setData({ + houseSearch:res.data + }) + }).catch(err=>{ + + }) + }, + handelClickResiHot(e){ + this.setData({ + tableData:[], + keyWord:e.currentTarget.dataset.label, + pageNo: 1, + }) + this.getTableData() + this.getAllOrgCategoryCount() + }, + handelClickHouseHot(e){ + this.setData({ + tableFwData:[], + houseListSearchFlag:true, + pageNo: 1, + keyWord:e.currentTarget.dataset.label + }) + this.getTableFwData() + }, }) diff --git a/pages/resiAndHouse/resiAndHouse.json b/pages/resiAndHouse/resiAndHouse.json index 46b3a80..66e94e4 100644 --- a/pages/resiAndHouse/resiAndHouse.json +++ b/pages/resiAndHouse/resiAndHouse.json @@ -6,7 +6,8 @@ "van-tab": "@vant/weapp/tab/index", "van-tabs": "@vant/weapp/tabs/index", "van-cascader": "@vant/weapp/cascader/index", - "van-popup": "@vant/weapp/popup/index" + "van-popup": "@vant/weapp/popup/index", + "van-tag": "@vant/weapp/tag/index" }, "navigationStyle": "custom", "backgroundColor": "#f8f8f8", diff --git a/pages/resiAndHouse/resiAndHouse.wxml b/pages/resiAndHouse/resiAndHouse.wxml index 28fbbfc..4182047 100644 --- a/pages/resiAndHouse/resiAndHouse.wxml +++ b/pages/resiAndHouse/resiAndHouse.wxml @@ -26,11 +26,18 @@ 搜索 - + + + + + {{item.label}} ({{item.count}}) + + + {{item.label}} ({{item.count}}) + - {{cascaderName}} diff --git a/pages/resiAndHouse/resiAndHouse.wxss b/pages/resiAndHouse/resiAndHouse.wxss index 2f4ff7b..04e10bc 100644 --- a/pages/resiAndHouse/resiAndHouse.wxss +++ b/pages/resiAndHouse/resiAndHouse.wxss @@ -22,6 +22,26 @@ page { position: relative; z-index: 100; } + .tag{ + width: 100%; + display: flex; + + height: 50rpx; + padding: 0 10rpx; + box-sizing: border-box; + overflow-x: scroll; + margin-top: 5rpx; + } + .tag view{ + padding: 8rpx 9rpx; + box-sizing: border-box; + font-size: 28rpx; + white-space: nowrap; + margin-right: 5rpx; + border-radius: 6rpx; + background-color: #e6f0ff; + color: #5698ff; + } .header_text_1 { margin-left: 20rpx; margin-top: 12rpx; @@ -58,7 +78,7 @@ page { border-radius: 20rpx; position: absolute; left: 0rpx; - top: 340rpx; + top: 401rpx; width: 750rpx; height: calc(100vh - 460rpx); overflow: hidden; @@ -1211,7 +1231,7 @@ page { } .scroll { - height: calc(100vh - 687rpx); + height: calc(100vh - 805rpx); width: 700rpx; } diff --git a/utils/api.js b/utils/api.js index d50b01b..ce34953 100644 --- a/utils/api.js +++ b/utils/api.js @@ -86,7 +86,9 @@ module.exports = { inspectionStaff, getChangeRecordsById, isUpdater, - Enterpriseambiguity + Enterpriseambiguity, + hotResidentSearch, + hotHouseSearch } // 获取公钥 @@ -452,3 +454,12 @@ function Enterpriseambiguity(parm){ function icEventList(){ return fly.post(`governance/icEvent/list`) } +//居民搜索热点 +function hotResidentSearch(){ + return fly.post(`actual/base/residentBaseInfo/hotResidentSearch`) +} +//房屋搜索热点 +function hotHouseSearch(){ + return fly.post(`actual/base/communityHouse/hotHouseSearch`) +} +