2213980799@qq.com пре 1 година
родитељ
комит
8523f44cd1
1 измењених фајлова са 10 додато и 2 уклоњено
  1. 10 2
      pages/maintenanceWorkorder/sparepart/index.vue

+ 10 - 2
pages/maintenanceWorkorder/sparepart/index.vue

@@ -28,6 +28,7 @@
 			this.getFirstList()
 		},
 		onReachBottom: function() {
+			console.log(11, 'a')
 			if (isEnd) {
 				return
 			}
@@ -58,8 +59,15 @@
 				}
 				getList(params)
 					.then(res => {
-						this.list = res.list
-						isEnd = res.count
+
+						if (page == 1) {
+							this.list = res.list
+						} else {
+							res.list.forEach(element => {
+								this.list.push(element)
+							})
+						}
+						isEnd = this.list.length >= res.count
 						uni.hideLoading()
 					})
 					.catch(() => {