diff --git a/pages/index/index.js b/pages/index/index.js index 714b4cc..a961974 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -17,7 +17,7 @@ Page({ nodata:false, emptyHouseNum:'', catesNonIntResiNum:'', - readFlag:'1', + readFlag:'0', agencyName:'--' }, @@ -62,17 +62,13 @@ onScrollToLower(e){ loadMoreVisible: true, nodata: false, loadMoreType: "more", + tableData:[] }) const parm = { - type:this.data.selectValue == 0? null :this.data.selectValue - 1, limit:this.data.pageSize, page:this.data.pageNo, readFlag:this.data.readFlag } - if(!parm.type) delete parm.type - if(this.data.tableData.length !==0){ - return - } getIntelligentMessage(parm).then(res=>{ res.data.list.forEach(item => { if (item.msgType === 'resident_base_info') { @@ -205,32 +201,15 @@ onScrollToLower(e){ }, // 人房信息采集 getSituation(){ - wx.showLoading({ title: '加载中', }) - // getSituation().then(res=>{ - // this.setData({ - // collectedHouseCount:res.data.collectedHouseCount.toLocaleString(), - // collectedPopulationCount:res.data.collectedPopulationCount.toLocaleString(), - // pendingHouseCount:res.data.pendingHouseCount, - // pendingPopulationCount:res.data.pendingPopulationCount, - // populationCount:res.data.populationCount, - // realEstateCount:res.data.realEstateCount, - // }) - // wx.hideLoading() - // }).catch(err=>{ - // wx.hideLoading() - // console.log(err); - // }) overView().then(res=>{ - console.log('123',res) this.setData({ - emptyHouseNum: res.data.emptyHouseNum.toLocaleString(), - catesNonIntResiNum: res.data.catesNonIntResiNum.toLocaleString(), - collectedHouseCount:res.data.totalHouseNum.toLocaleString(), - collectedPopulationCount:res.data.totalResiNum.toLocaleString(), - + emptyHouseNum: this.formatNumberWithCommas(res.data.emptyHouseNum), + catesNonIntResiNum:this.formatNumberWithCommas(res.data.catesNonIntResiNum), + collectedHouseCount:this.formatNumberWithCommas(res.data.totalHouseNum), + collectedPopulationCount:this.formatNumberWithCommas(res.data.totalResiNum), }) wx.hideLoading() }).catch(err=>{ @@ -238,6 +217,9 @@ onScrollToLower(e){ console.log(err); }) }, +formatNumberWithCommas(number) { + return new Intl.NumberFormat().format(number); +}, onAddResident(){ wx.navigateTo({ url: '../../subpages/addResi/pages/addResi/addResi', diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 0caee3d..3032129 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -92,28 +92,5 @@ - \ No newline at end of file diff --git a/subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss b/subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss index 968f8c2..2156763 100644 --- a/subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss +++ b/subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss @@ -174,7 +174,7 @@ text-align: center; font-weight: 500; text-align: center; white-space: nowrap; - line-height: 42rpx; + line-height: 34rpx; margin-right: 10rpx; margin-left: 10rpx;