xiaocao пре 5 месеци
родитељ
комит
823e2a99b2
1 измењених фајлова са 10 додато и 10 уклоњено
  1. 10 10
      pages/tabbar/visitor.vue

+ 10 - 10
pages/tabbar/visitor.vue

@@ -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 || '获取数据失败',