Procházet zdrojové kódy

修复多处bug 刷新

xiaocao před 5 měsíci
rodič
revize
823e2a99b2
1 změnil soubory, kde provedl 10 přidání a 10 odebrání
  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 {
 					} else {
 						uni.showToast({
 						uni.showToast({
 							title: response.msg || '获取数据失败',
 							title: response.msg || '获取数据失败',