|
|
@@ -121,7 +121,7 @@
|
|
|
// Refresh list
|
|
|
refresh() {
|
|
|
this.visitList = []
|
|
|
- this.params.current = 1
|
|
|
+ // this.params.current = 1
|
|
|
this.hasMore = true
|
|
|
this.loadMoreStatus = 'loadmore'
|
|
|
this.getList()
|
|
|
@@ -129,10 +129,10 @@
|
|
|
|
|
|
// Handle reaching bottom of scroll
|
|
|
onReachBottom() {
|
|
|
- if (!this.hasMore || this.loadMoreStatus === 'loading') return
|
|
|
-
|
|
|
- this.params.current++
|
|
|
- this.getList(true)
|
|
|
+ // if (!this.hasMore || this.loadMoreStatus === 'loading') return
|
|
|
+ //
|
|
|
+ // this.params.current++
|
|
|
+ // this.getList(true)
|
|
|
},
|
|
|
|
|
|
// Get status class for styling
|
|
|
@@ -215,16 +215,16 @@
|
|
|
};
|
|
|
});
|
|
|
|
|
|
- if (loadMore) {
|
|
|
- this.visitList = [...this.visitList, ...list];
|
|
|
- } else {
|
|
|
- this.visitList = list;
|
|
|
- }
|
|
|
-
|
|
|
- // 根据返回的数据判断是否还有更多数据
|
|
|
- // 这里简单处理,如果返回的数据少于每页数量,说明没有更多了
|
|
|
- this.hasMore = response.rows.length >= this.params.size;
|
|
|
- this.loadMoreStatus = this.hasMore ? 'loadmore' : 'nomore';
|
|
|
+ // if (loadMore) {
|
|
|
+ // this.visitList = [...this.visitList, ...list];
|
|
|
+ // } else {
|
|
|
+ // this.visitList = list;
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // // 根据返回的数据判断是否还有更多数据
|
|
|
+ // // 这里简单处理,如果返回的数据少于每页数量,说明没有更多了
|
|
|
+ // this.hasMore = response.rows.length >= this.params.size;
|
|
|
+ // this.loadMoreStatus = this.hasMore ? 'loadmore' : 'nomore';
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: response.msg || '获取数据失败',
|