新增奇遇界面;修复异常

This commit is contained in:
2026-07-26 21:52:40 +08:00
parent 03e5e2f529
commit d575d584cb
9 changed files with 380 additions and 168 deletions
+13 -25
View File
@@ -464,6 +464,10 @@ function showListLoading(selector, loadingHtml) {
$(selector).html(loadingHtml || DEFAULT_LIST_LOADING_HTML);
}
function hidePagination(selector) {
$(selector).hide();
}
function setCategoryLinkActive($link, childSelector) {
$link.addClass('active').parent().siblings().children(childSelector || 'a').removeClass('active');
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
@@ -1203,12 +1207,8 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
url: cat,
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
const $pagingArea = $('#t_pagination .post-paging');
if ($pagingArea.length) {
$pagingArea.html('<div uk-spinner></div>');
} else {
showListLoading('.moment_list');
}
showListLoading('.moment_list');
hidePagination('#t_pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1271,12 +1271,8 @@ $(document).on('click', '.friends_cat_nav .cat-link', function () {
url: url,
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
const $pagingArea = $('#t_pagination .post-paging');
if ($pagingArea.length) {
$pagingArea.html('<div uk-spinner></div>');
} else {
showListLoading('.moment_list');
}
showListLoading('.moment_list');
hidePagination('#t_pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1556,12 +1552,8 @@ $(document).ready(function () {
url: url,
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
const $pagingArea = $('#p_pagination .post-paging');
if ($pagingArea.length) {
$pagingArea.html('<div uk-spinner></div>');
} else {
showListLoading("#photos_item", PHOTO_LIST_LOADING_HTML);
}
showListLoading("#photos_item", PHOTO_LIST_LOADING_HTML);
hidePagination('#p_pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1815,12 +1807,8 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
url: cat, // 完全保留原有请求URL,不修改
headers: HTML_PAGE_AJAX_HEADERS,
beforeSend: function () {
const $pagingArea = $('#pagination .post-paging');
if ($pagingArea.length) {
$pagingArea.html('<div uk-spinner></div>');
} else {
showListLoading('.norpost_list');
}
showListLoading('.norpost_list');
hidePagination('#pagination');
},
success: function (data) {
setCategoryLinkActive($this);
@@ -1831,7 +1819,7 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
updateLoadMorePagination('#pagination', '.norpost_list', data, '.arc_pagenav');
$('.loading_box').remove();
$('.norpost_list .loading_box').remove();
initAgree();
lazyLoadInstance.update();
$('.posts_cat_nav ul li a').removeClass('disabled');