moluofu 2 lat temu
rodzic
commit
0691d7a952
1 zmienionych plików z 9 dodań i 11 usunięć
  1. 9 11
      pages/index/index.vue

+ 9 - 11
pages/index/index.vue

@@ -419,17 +419,15 @@
 
 			onReachBottom() {
 				// console.log(this.page, this.total)
-				setTimeout(() => {
-					if (this.total - this.page * 5 <= 0) {
-						this.status = 'nomore'
-						// console.log('ww')
-					} else {
-						// console.log('w')
-						this.status = 'loading';
-						this.page++
-						this.getList()
-					}
-				}, 1000)
+				if (this.total - this.page * 5 <= 0) {
+					this.status = 'nomore'
+					// console.log('ww')
+				} else {
+					// console.log('w')
+					this.status = 'loading';
+					this.page++
+					this.getList()
+				}
 			}
 
 		}