소스 검색

分页加载bug修复完善

ming 3 년 전
부모
커밋
4b0d2d168a
2개의 변경된 파일12개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 0
      pages/eleControl/powerCut/powerCut.vue
  2. 8 6
      pages/processList/processList.vue

+ 4 - 0
pages/eleControl/powerCut/powerCut.vue

@@ -244,10 +244,14 @@
 					if (res.data.data.length < this.size) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
 						this.isLoadMore = true
 						this.loadStatus = 'nomore'
+		
 					} else {
+					
+						this.loadStatus='loading'
 						this.isLoadMore = false
 					}
 				} else {
+					
 					this.isLoadMore = true
 					this.loadStatus = 'nomore'
 				}

+ 8 - 6
pages/processList/processList.vue

@@ -37,7 +37,7 @@
 						</view>
 					</view>
 					<view class=" text-center margin-top" v-if="alarmUntreatedCount == 0">暂无数据...</view>
-					<view v-show="isLoadMore&&alarmUntreatedCount!= 0">
+					<view v-show="isLoadMore&&alarmUntreatedCount!= 0&&this.currentPage>1">
 						<uni-load-more :status="loadStatus"></uni-load-more>
 					</view>
 				</view>
@@ -345,26 +345,28 @@
 
 				// }
 				// console.log(this.porcessedList)
-				
+				this.alarmUntreatedCount1 = parseInt(res.data.alarmUntreatedCount)
+				this.alarmUntreatedCount = parseInt(res.data.alarmUntreatedCount)
 				if (res.data.data.length) {
 					if (whichTab == 0) {
 						this.unporcessList = this.unporcessList.concat(res.data.data)
 						this.alarmUntreatedCount = parseInt(res.data.alarmUntreatedCount)
-									
 					} else {
 						this.porcessedList = this.porcessedList.concat(res.data.data);
-						
 						this.alarmUntreatedCount1 = parseInt(res.data.alarmUntreatedCount)
 						console.log(this.alarmUntreatedCount1)
-					}
-									
+					}			
 					if (res.data.data.length < this.size) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+			
 						this.isLoadMore = true
 						this.loadStatus = 'nomore'
 					} else {
+					
 						this.isLoadMore = false
+					
 					}
 				} else {
+					
 					this.isLoadMore = true
 					this.loadStatus = 'nomore'
 				}