Browse Source

搜索热点bug修改

taidong
mk 1 year ago
parent
commit
4b072b16a1
  1. 43
      pages/resiAndHouse/resiAndHouse.js
  2. 3
      pages/resiAndHouse/resiAndHouse.json
  3. 9
      pages/resiAndHouse/resiAndHouse.wxml
  4. 24
      pages/resiAndHouse/resiAndHouse.wxss
  5. 13
      utils/api.js

43
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()
},
})

3
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",

9
pages/resiAndHouse/resiAndHouse.wxml

@ -26,11 +26,18 @@
<text>搜索</text>
</view>
</view>
</view>
<view wx:if="{{selectVale === 'resi'}}" class="tag">
<view wx:for="{{resiSearch}}" data-label="{{item.label}}" bind:tap="handelClickResiHot" style="margin-right: 10rpx;">{{item.label}} ({{item.count}})</view>
</view>
<view wx:if="{{selectVale === 'house'}}" class="tag">
<view wx:for="{{houseSearch}}" style="margin-right: 10rpx;" bind:tap="handelClickHouseHot" data-label="{{item.label}}">{{item.label}} ({{item.count}})</view>
</view>
</view>
<view class="group_2" wx:if="{{selectVale === 'resi'}}">
<view class="section_2">
<view class="box_16">
<text lines="1" class="text_4">{{cascaderName}}</text>

24
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;
}

13
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`)
}

Loading…
Cancel
Save