moluofu пре 2 година
родитељ
комит
44726d2468
1 измењених фајлова са 15 додато и 11 уклоњено
  1. 15 11
      pages/index/index.vue

+ 15 - 11
pages/index/index.vue

@@ -315,7 +315,7 @@
 
 			// 点击改变是否观察或者处理记录
 			to(data) {
-				if(this.status = 'loading'){
+				if (this.status == 'loading') {
 					return
 				}
 				this.key = ''
@@ -323,7 +323,9 @@
 				this.tobu = data
 				this.listData = []
 				this.status = 'loading'
-				this.getList()
+				setTimeout(() => {
+					this.getList()
+				}, 1000)
 			},
 
 			cancelT(data) {
@@ -422,15 +424,17 @@
 
 			onReachBottom() {
 				// console.log(this.page, this.total)
-				if (this.total - this.page * 5 <= 0) {
-					this.status = 'nomore'
-					// console.log('ww')
-				} else {
-					// console.log('w')
-					this.status = 'loading';
-					this.page++
-					this.getList()
-				}
+				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()
+					}
+				}, 100)
 			}
 
 		}