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 // pages/resiAndHouse/resiAndHouse.js
import api, {getAllOrgCategoryCount,getResidentBaseInfo} from "../../utils/api" import api, {getAllOrgCategoryCount,getResidentBaseInfo,getCommunityHouse} from "../../utils/api"
const App = getApp() const App = getApp()
Page({ Page({
/** /**
@ -10,51 +9,20 @@ Page({
data: { data: {
activeType:0, activeType:0,
tabList:[], tabList:[],
tableData:[],
resiList:[ resiList:[
{ {
name:'乌贼', name:'',
resiTags:['党员','特扶人员','特扶人员','老年人','老年人'], resiTags:[''],
nationalityName:'中国', nationalityName:'',
nationName:'汉族', nationName:'',
mobile:'110', mobile:'',
idNum:'410622199910146016', idNum:'',
agencyName:'市北区', agencyName:'',
homeName:'农贸市场一号楼1单元101', homeName:'',
updatedTime:'2024-03-26 14:15:36' updatedTime:''
}, }
{
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'
},
], ],
pageNo:1, pageNo:1,
pageSize:10, pageSize:10,
@ -74,6 +42,7 @@ Page({
}) })
this.getAgencygridtree() this.getAgencygridtree()
this.getAllOrgCategoryCount() this.getAllOrgCategoryCount()
this.onSearchMessage()
}, },
// //
/** /**
@ -176,6 +145,7 @@ Page({
} }
let {data,code,msg} = await getResidentBaseInfo(parm) let {data,code,msg} = await getResidentBaseInfo(parm)
if(code == 0){ if(code == 0){
console.log(this.data.tableData),
this.setData({ this.setData({
loadMoreType:data.list.length === this.data.pageSize ? 'more' : 'none', loadMoreType:data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(data.list), tableData: this.data.tableData.concat(data.list),
@ -222,5 +192,37 @@ Page({
this.setData({ this.setData({
showAngenCascader:false 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}}" /> <input type="text" placeholder="姓名/手机/身份证" bindinput="handelBlurKeyWord" bindblur="handelBlurKeyWord" value="{{keyWord}}" />
<view class="btn_box" bind:tap="handelClickSearch"> <view class="btn_box" bind:tap="handelClickSearch">
<image src="../../images/cardIcon.png" mode="" class="OCR_img" bind:tap="handelClickToOcr"/> <image src="../../images/cardIcon.png" mode="" class="OCR_img" bind:tap="handelClickToOcr"/>
<text>搜索</text> <text bindtap="onSearchMessage">搜索</text>
</view> </view>
</view> </view>
@ -50,7 +50,7 @@
<view class="box_18"> <view class="box_18">
<text lines="1" class="text_16">{{item.name}}</text> <text lines="1" class="text_16">{{item.name}}</text>
<view class="resi_tag"> <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}} {{itemC}}
</view> </view>
</view> </view>
@ -61,11 +61,11 @@
</view> </view>
</view> </view>
<view class="box_19"> <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_21">国籍:</text>
<text lines="1" class="text_22">{{item.nationalityName}}</text> <text lines="1" class="text_22">{{item.nationalityName || "--"}}</text>
</view> </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_23">民族:</text>
<text lines="1" class="text_24">{{item.nationName}}</text> <text lines="1" class="text_24">{{item.nationName}}</text>
</view> </view>
@ -81,9 +81,9 @@
</view> </view>
<view class="text-wrapper_14"> <view class="text-wrapper_14">
<text lines="1" class="text_30">地址:</text> <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>
<view class="text-wrapper_15"> <view class="text-wrapper_15" wx:if="{{item.updatedTime}}">
<text lines="1" class="text_32">最新更新时间:</text> <text lines="1" class="text_32">最新更新时间:</text>
<text lines="1" decode="true" class="text_33">{{item.updatedTime}}</text> <text lines="1" decode="true" class="text_33">{{item.updatedTime}}</text>
</view> </view>

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

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

Loading…
Cancel
Save