每日任务 - 公会长任务 - 修改成员上麦详情 重置滚动位置
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user