shish 2 лет назад
Родитель
Сommit
03504e5c26
1 измененных файлов с 14 добавлено и 9 удалено
  1. 14 9
      ghsApp/src/admin/clear/list.vue

+ 14 - 9
ghsApp/src/admin/clear/list.vue

@@ -26,23 +26,28 @@ export default {
 	},
 	onPullDownRefresh() {
 		this.resetList();
-		this._list().then(res => {
+		this.getClearList().then(res => {
 			uni.stopPullDownRefresh();
 		});
 	},
+	onReachBottom() {
+		if (!this.list.finished) {
+			this.getClearList().then((res) => {
+				uni.stopPullDownRefresh()
+			})
+		} else {
+			uni.stopPullDownRefresh()
+		}
+	},
 	methods: {
 		async init() {
-			this._list();
+			this.getClearList();
 		},
-		_list() {
-			let options = {
-				page: this.list.page,
-				pageSize: this.list.pageSize,
-				ghsId:this.option.ghsId
-			};
+		getClearList() {
+			let options = { page: this.list.page, pageSize: this.list.pageSize, ghsId:this.option.ghsId }
 			return getClearList(options).then(res => {
 					this.completes(res);
-				}).catch(err => {});
+			})
 		},
 		gotoDetail(item) {
 			uni.navigateTo({