|
@@ -79,6 +79,10 @@
|
|
houseName: '',
|
|
houseName: '',
|
|
pop: false,
|
|
pop: false,
|
|
kgName: '展开搜索',
|
|
kgName: '展开搜索',
|
|
|
|
+ params: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ },
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -86,16 +90,47 @@
|
|
this.getListAll();
|
|
this.getListAll();
|
|
this.select();
|
|
this.select();
|
|
},
|
|
},
|
|
|
|
+ onReachBottom() {
|
|
|
|
+ this.getNextListFn()
|
|
|
|
+ },
|
|
|
|
+ onPullDownRefresh() {
|
|
|
|
+ this.getListAll();
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
|
+ }, 1000);
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
getListAll() {
|
|
getListAll() {
|
|
service.getListAll({serviceType: this.show,
|
|
service.getListAll({serviceType: this.show,
|
|
areaName:this.areaName,
|
|
areaName:this.areaName,
|
|
buildingName:this.buildingName,
|
|
buildingName:this.buildingName,
|
|
unitName:this.unitName,
|
|
unitName:this.unitName,
|
|
- houseName:this.houseName}).then(res => {
|
|
|
|
- this.list = res
|
|
|
|
|
|
+ houseName:this.houseName,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.list = res.records;
|
|
|
|
+ that.total = res.total || 0;
|
|
|
|
+ that.params.pageNum = res.current + 1;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getNextListFn(){
|
|
|
|
+ if (this.list.length < this.total) {
|
|
|
|
+ service.getListAll({serviceType: this.show,
|
|
|
|
+ areaName:this.areaName,
|
|
|
|
+ buildingName:this.buildingName,
|
|
|
|
+ unitName:this.unitName,
|
|
|
|
+ houseName:this.houseName,
|
|
|
|
+ pageSize: this.params.pageSize,
|
|
|
|
+ pageNum: this.params.pageNum,
|
|
|
|
+ }).then(response => {
|
|
|
|
+ that.params.pageNum = response.current + 1
|
|
|
|
+ response.records.forEach(item =>{
|
|
|
|
+ that.list.push(item)
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
gotopage(url) {
|
|
gotopage(url) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url
|
|
url
|