diff --git a/front/src/views/capacitySquare/components/algorithm.vue b/front/src/views/capacitySquare/components/algorithm.vue index dadd7f2d..57e4004d 100644 --- a/front/src/views/capacitySquare/components/algorithm.vue +++ b/front/src/views/capacitySquare/components/algorithm.vue @@ -75,7 +75,10 @@ var windowHeight = e.currentTarget.clientHeight var scrollHeight = e.currentTarget.scrollHeight console.log(scrollTop, windowHeight, scrollHeight, '123') - if (scrollTop + windowHeight == scrollHeight) { + if ( + scrollTop + windowHeight <= scrollHeight + 1 && + scrollTop + windowHeight >= scrollHeight - 1 + ) { // 当前滚动条已经触底 isNoMore.value = true params.pageNum++ diff --git a/front/src/views/capacitySquare/components/layer.vue b/front/src/views/capacitySquare/components/layer.vue index 78a33f3c..2b9e03b5 100644 --- a/front/src/views/capacitySquare/components/layer.vue +++ b/front/src/views/capacitySquare/components/layer.vue @@ -75,7 +75,10 @@ var windowHeight = e.currentTarget.clientHeight var scrollHeight = e.currentTarget.scrollHeight console.log(scrollTop, windowHeight, scrollHeight, '123') - if (scrollTop + windowHeight == scrollHeight) { + if ( + scrollTop + windowHeight <= scrollHeight + 1 && + scrollTop + windowHeight >= scrollHeight - 1 + ) { // 当前滚动条已经触底 isNoMore.value = true params.pageNum++