|
@@ -67,8 +67,29 @@
|
|
|
title: "加载中",
|
|
|
mask: true
|
|
|
})
|
|
|
+
|
|
|
this.init()
|
|
|
},
|
|
|
+
|
|
|
+ onReachBottom() {
|
|
|
+ let _self = this
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ setTimeout(function() {
|
|
|
+ _self.currentPage++;
|
|
|
+ _self.init();
|
|
|
+ }, 2000);
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ let _self = this
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.stopPullDownRefresh();//停止当前页面下拉刷新
|
|
|
+ _self.currentPage=0;
|
|
|
+ _self.init();
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
methods: {
|
|
|
keyWordChange(e){
|
|
|
this.searchKeyWord=e
|
|
@@ -77,13 +98,21 @@
|
|
|
mask: true
|
|
|
})
|
|
|
this.init()
|
|
|
+
|
|
|
},
|
|
|
init() {
|
|
|
this.$api.doRequest('get', '/contractManagementInfo/selectInfo',
|
|
|
{compId:uni.getStorageSync('pcUserInfo').compId,
|
|
|
contractType: this.contractType,goodsType:1,currentPage: this.currentPage,pageSize: this.pageSize,searchKeyWord:this.searchKeyWord}).then(res => {
|
|
|
uni.hideLoading()
|
|
|
- this.contractList=res.data.data.records
|
|
|
+ if(res.data.data.records.length==0){
|
|
|
+ uni.showToast({title:'没有更多数据了',icon:"none"});
|
|
|
+ }
|
|
|
+ if(this.currentPage!=0){
|
|
|
+ this.contractList=this.contractList.concat(res.data.data.records)
|
|
|
+ }else{
|
|
|
+ this.contractList=res.data.data.records
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
getdata(e) {
|