Browse Source

no message

work_tab_bar
是小王呀\24601 1 year ago
parent
commit
e7ac98981c
  1. 92
      pages/resiAndHouse/resiAndHouse.js
  2. 14
      pages/resiAndHouse/resiAndHouse.wxml
  3. 5
      subpages/searchResult/pages/searchResult/searchResult.js

92
pages/resiAndHouse/resiAndHouse.js

@ -1,7 +1,6 @@
// pages/resiAndHouse/resiAndHouse.js
import api, {getAllOrgCategoryCount,getResidentBaseInfo} from "../../utils/api"
import api, {getAllOrgCategoryCount,getResidentBaseInfo,getCommunityHouse} from "../../utils/api"
const App = getApp()
Page({
/**
@ -10,51 +9,20 @@ Page({
data: {
activeType:0,
tabList:[],
tableData:[],
resiList:[
{
name:'乌贼',
resiTags:['党员','特扶人员','特扶人员','老年人','老年人'],
nationalityName:'中国',
nationName:'汉族',
mobile:'110',
idNum:'410622199910146016',
agencyName:'市北区',
homeName:'农贸市场一号楼1单元101',
updatedTime:'2024-03-26 14:15:36'
},
{
name:'乌贼',
resiTags:['党员','特扶人员','老年人'],
nationalityName:'中国',
nationName:'汉族',
mobile:'110',
idNum:'410622199910146016',
agencyName:'市北区',
homeName:'农贸市场一号楼1单元101',
updatedTime:'2024-03-26 14:15:36'
},
{
name:'乌贼',
resiTags:['党员','特扶人员','老年人'],
nationalityName:'中国',
nationName:'汉族',
mobile:'110',
idNum:'410622199910146016',
agencyName:'市北区',
homeName:'农贸市场一号楼1单元101',
updatedTime:'2024-03-26 14:15:36'
},
{
name:'乌贼',
resiTags:['党员','特扶人员','老年人'],
nationalityName:'中国',
nationName:'汉族',
mobile:'110',
idNum:'410622199910146016',
agencyName:'市北区',
homeName:'农贸市场一号楼1单元101',
updatedTime:'2024-03-26 14:15:36'
},
name:'',
resiTags:[''],
nationalityName:'',
nationName:'',
mobile:'',
idNum:'',
agencyName:'',
homeName:'',
updatedTime:''
}
],
pageNo:1,
pageSize:10,
@ -74,6 +42,7 @@ Page({
})
this.getAgencygridtree()
this.getAllOrgCategoryCount()
this.onSearchMessage()
},
//
/**
@ -176,6 +145,7 @@ Page({
}
let {data,code,msg} = await getResidentBaseInfo(parm)
if(code == 0){
console.log(this.data.tableData),
this.setData({
loadMoreType:data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(data.list),
@ -222,5 +192,37 @@ Page({
this.setData({
showAngenCascader:false
})
},
onSearchMessage(){
let parm ={
searchKey:this.data.keyWord,
pageSize:this.data.pageSize,
pageNo:this.data.pageNo
}
getResidentBaseInfo(parm).then(res=>{
console.log("11111",res);
this.setData({
'resiList':res.data.list
})
console.log("123",this.resiList);
}).catch(err=>{
console.log(err);
})
},
onAllSearchMessage(){
let parm ={
searchKey:" ",
pageSize:this.data.pageSize,
pageNo:this.data.pageNo
}
getResidentBaseInfo(parm).then(res=>{
console.log("11111",res);
this.setData({
'resiList':res.data.list
})
console.log("123",this.resiList);
}).catch(err=>{
console.log(err);
})
}
})

14
pages/resiAndHouse/resiAndHouse.wxml

@ -20,7 +20,7 @@
<input type="text" placeholder="姓名/手机/身份证" bindinput="handelBlurKeyWord" bindblur="handelBlurKeyWord" value="{{keyWord}}" />
<view class="btn_box" bind:tap="handelClickSearch">
<image src="../../images/cardIcon.png" mode="" class="OCR_img" bind:tap="handelClickToOcr"/>
<text>搜索</text>
<text bindtap="onSearchMessage">搜索</text>
</view>
</view>
@ -50,7 +50,7 @@
<view class="box_18">
<text lines="1" class="text_16">{{item.name}}</text>
<view class="resi_tag">
<view class="text-wrapper_8" wx:for="{{item.resiTags}}" wx:for-item="itemC">
<view class="text-wrapper_8" wx:for="{{item.categoryInfo.categoryNames}}" wx:for-item="itemC">
{{itemC}}
</view>
</view>
@ -61,11 +61,11 @@
</view>
</view>
<view class="box_19">
<view class="text-wrapper_10">
<view class="text-wrapper_10" wx:if="{{item.nationalityName}}">
<text lines="1" class="text_21">国籍:</text>
<text lines="1" class="text_22">{{item.nationalityName}}</text>
<text lines="1" class="text_22">{{item.nationalityName || "--"}}</text>
</view>
<view class="text-wrapper_11">
<view class="text-wrapper_11" wx:if="{{item.nationName}}">
<text lines="1" class="text_23">民族:</text>
<text lines="1" class="text_24">{{item.nationName}}</text>
</view>
@ -81,9 +81,9 @@
</view>
<view class="text-wrapper_14">
<text lines="1" class="text_30">地址:</text>
<text lines="1" class="text_31">{{item.agencyName + item.homeName}}</text>
<text lines="1" class="text_31">{{item.agencyName || ''}} {{item.homeName || ''}}</text>
</view>
<view class="text-wrapper_15">
<view class="text-wrapper_15" wx:if="{{item.updatedTime}}">
<text lines="1" class="text_32">最新更新时间:</text>
<text lines="1" decode="true" class="text_33">{{item.updatedTime}}</text>
</view>

5
subpages/searchResult/pages/searchResult/searchResult.js

@ -97,7 +97,9 @@ Page({
}
if(this.data.type == 'resi'){
getResidentBaseInfo(parm).then(res=>{
console.log(this.data.tableData);
this.setData({
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(res.data.list),
})
@ -115,8 +117,11 @@ Page({
})
}else{
getCommunityHouse(parm).then(res=>{
console,log(this.data.tableData),
this.setData({
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(res.data.list),
})
if (this.data.tableData.length == 0) {

Loading…
Cancel
Save