Procházet zdrojové kódy

Merge branch 'test' of git.echepei.com:sailun/sailun-tbr-web into test

caojunjie před 4 roky
rodič
revize
f1cd6d2e3a
1 změnil soubory, kde provedl 14 přidání a 16 odebrání
  1. 14 16
      pages/me/Reward-details/index.vue

+ 14 - 16
pages/me/Reward-details/index.vue

@@ -149,7 +149,7 @@
 						console.log(res)
 						// this.datalist = res.data.data
 						this.count = res.data.count
-						this.datalength = res.data.data.length
+						// this.datalength = res.data.data.length
 						this.datalist = this.datalist.concat(res.data.data)
 
 						// 判断扫码类型
@@ -218,7 +218,7 @@
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,
 							userId: this.$store.state.storeInfo.userId,
-							'current': '1',
+							'current': this.current1,
 							'size': '10',
 							'startTime': this.startTime + ' 00:00:00',
 							'endTime': this.endTime + ' 23:59:59'
@@ -290,7 +290,7 @@
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,
 							userId: this.$store.state.storeInfo.userId,
-							'current': '1',
+							'current': this.current1,
 							'size': '10',
 							'brandCode': this.label
 						}
@@ -344,20 +344,18 @@
 			console.log("@@@")
 			console.log(this.count)
 			console.log(this.datalength)
+			console.log(this.current1)
+			this.status = 'loading';
 			setTimeout(() => {
-				if (this.count > this.datalength) {
-					this.current1 = ++this.current1;
-					this.data()
-					this.status = 'nomore'
-
-				} else {
-
-					this.status = 'loading';
-					console.log("@@@")
-					// this.status = 'nomore'
-
-				}
-			}, 1000)
+							if (this.datalist.length >= this.count) {
+								this.status = 'nomore';
+							} else {
+								this.current1 = ++this.current1;
+								this.data()	
+								
+							}
+						}, 1000)
+				
 
 		}
 	}