每日任务 - 公会长任务 - 修改成员上麦详情 重置滚动位置
This commit is contained in:
@@ -1581,12 +1581,19 @@ $('.Daily_list').on('click', '.detail_btn', function () {
|
|||||||
// 重置分页参数
|
// 重置分页参数
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
|
hasMoreData = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let level = $(this).attr('level');
|
let level = $(this).attr('level');
|
||||||
let statDate = $(this).attr('statDate');
|
let statDate = $(this).attr('statDate');
|
||||||
let taskKey = $(this).attr('taskkey');
|
let taskKey = $(this).attr('taskkey');
|
||||||
let guildId = $(this).attr('guildId');
|
let guildId = $(this).attr('guildId');
|
||||||
$('.wrap_list').empty();
|
$('.wrap_list').empty();
|
||||||
|
// 重置滚动位置到顶部
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.wrap_list').scrollTop(0);
|
||||||
|
}, 50);
|
||||||
if (!statDate) {
|
if (!statDate) {
|
||||||
bodyScroolFun(true);
|
bodyScroolFun(true);
|
||||||
$('.popup_tip').show();
|
$('.popup_tip').show();
|
||||||
@@ -1641,7 +1648,7 @@ $('.Daily_list').on('click', '.detail_btn', function () {
|
|||||||
// 初始化滚动分页监听
|
// 初始化滚动分页监听
|
||||||
initScrollPagination();
|
initScrollPagination();
|
||||||
}
|
}
|
||||||
|
console.log(hasMoreData,isLoading);
|
||||||
} else {
|
} else {
|
||||||
toastMsg(res.message)
|
toastMsg(res.message)
|
||||||
}
|
}
|
||||||
@@ -1672,9 +1679,8 @@ function initScrollPagination() {
|
|||||||
const scrollTop = $this.scrollTop();
|
const scrollTop = $this.scrollTop();
|
||||||
const scrollHeight = $this[0].scrollHeight;
|
const scrollHeight = $this[0].scrollHeight;
|
||||||
const clientHeight = $this[0].clientHeight;
|
const clientHeight = $this[0].clientHeight;
|
||||||
|
|
||||||
// 判断是否滚动到底部(精确判断)
|
// 判断是否滚动到底部(精确判断)
|
||||||
if (scrollHeight - scrollTop - clientHeight < 1 && hasMoreData && !isLoading) {
|
if (scrollHeight - scrollTop - clientHeight <= 1 && hasMoreData && !isLoading) {
|
||||||
loadMoreData();
|
loadMoreData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1728,7 +1734,7 @@ function loadMoreData() {
|
|||||||
} else {
|
} else {
|
||||||
currentPage++;
|
currentPage++;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
toastMsg(res.message);
|
toastMsg(res.message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user