|
@@ -11,7 +11,6 @@ Page({
|
|
|
showIndex: -1, //显示按钮的下标
|
|
|
cooperationList: [], //合作列表
|
|
|
condition: "", //模糊搜索条件
|
|
|
- scrolltolowerThrottle: true, //下拉触底截流
|
|
|
pageNumber: 1, //请求分页
|
|
|
pageTotal: 1, //总页数
|
|
|
},
|
|
@@ -70,11 +69,8 @@ Page({
|
|
|
},
|
|
|
/* 下拉触底 */
|
|
|
scrolltolower() {
|
|
|
- if (!this.data.scrolltolowerThrottle) return;
|
|
|
- this.setData({
|
|
|
- scrolltolowerThrottle: false
|
|
|
- })
|
|
|
- if (this.data.pageTotal > this.data.pageNumber) this.getList();
|
|
|
+ if (this.data.pageTotal < this.data.pageNumber) return;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
getList() {
|
|
|
_Http.basic({
|
|
@@ -97,17 +93,14 @@ Page({
|
|
|
title: res.data,
|
|
|
icon: "none"
|
|
|
});
|
|
|
- let cooperationList = [];
|
|
|
- if (res.pageNumber == 1) {
|
|
|
- cooperationList = res.data
|
|
|
- } else {
|
|
|
- cooperationList = this.data.requestList.concat(res.data)
|
|
|
+ let cooperationList = res.data;
|
|
|
+ if (res.pageNumber != 1) {
|
|
|
+ cooperationList = this.data.cooperationList.concat(cooperationList)
|
|
|
};
|
|
|
this.setData({
|
|
|
cooperationList,
|
|
|
pageTotal: res.pageTotal,
|
|
|
- pageNumber: this.data.pageNumber + 1,
|
|
|
- scrolltolowerThrottle: true
|
|
|
+ pageNumber: this.data.pageNumber + 1
|
|
|
});
|
|
|
})
|
|
|
},
|