From d68af700c3dd1c6889e5fd1b2c1d77047b3dc592 Mon Sep 17 00:00:00 2001 From: yujiacong <1016029365@qq.com> Date: Sat, 11 Oct 2025 18:36:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E4=BB=BB=E5=8A=A1=20-=20?= =?UTF-8?q?=E5=85=AC=E4=BC=9A=E9=95=BF=E4=BB=BB=E5=8A=A1=20-=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=88=90=E5=91=98=E4=B8=8A=E9=BA=A6=E8=AF=A6=E6=83=85?= =?UTF-8?q?=20=E9=87=8D=E7=BD=AE=E6=BB=9A=E5=8A=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/moliparty/modules/taskCenter/js/index.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/view/moliparty/modules/taskCenter/js/index.js b/view/moliparty/modules/taskCenter/js/index.js index d24fe6e..72423c2 100644 --- a/view/moliparty/modules/taskCenter/js/index.js +++ b/view/moliparty/modules/taskCenter/js/index.js @@ -1581,12 +1581,19 @@ $('.Daily_list').on('click', '.detail_btn', function () { // 重置分页参数 currentPage = 1; isLoading = false; + hasMoreData = true; + + let level = $(this).attr('level'); let statDate = $(this).attr('statDate'); let taskKey = $(this).attr('taskkey'); let guildId = $(this).attr('guildId'); $('.wrap_list').empty(); + // 重置滚动位置到顶部 + setTimeout(() => { + $('.wrap_list').scrollTop(0); + }, 50); if (!statDate) { bodyScroolFun(true); $('.popup_tip').show(); @@ -1641,7 +1648,7 @@ $('.Daily_list').on('click', '.detail_btn', function () { // 初始化滚动分页监听 initScrollPagination(); } - + console.log(hasMoreData,isLoading); } else { toastMsg(res.message) } @@ -1672,9 +1679,8 @@ function initScrollPagination() { const scrollTop = $this.scrollTop(); const scrollHeight = $this[0].scrollHeight; const clientHeight = $this[0].clientHeight; - // 判断是否滚动到底部(精确判断) - if (scrollHeight - scrollTop - clientHeight < 1 && hasMoreData && !isLoading) { + if (scrollHeight - scrollTop - clientHeight <= 1 && hasMoreData && !isLoading) { loadMoreData(); } }); @@ -1728,7 +1734,7 @@ function loadMoreData() { } else { currentPage++; } - + } else { toastMsg(res.message); }