重构课外书;修复异常;优化体验
This commit is contained in:
@@ -245,6 +245,7 @@ function getPreviousPageContext() {
|
||||
initAgree();
|
||||
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
|
||||
initializeMomentFold();
|
||||
initDoubanDetailLinks();
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1239,9 +1240,6 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
|
||||
// ajax分类筛选朋友圈
|
||||
$(document).on('click', '.friends_cat_nav .cat-link', function () {
|
||||
var $this = $(this);
|
||||
if ($this.closest('.douban_cat_nav').length > 0) {
|
||||
return;
|
||||
}
|
||||
if ($this.hasClass('disabled')) {
|
||||
return false;
|
||||
}
|
||||
@@ -1296,6 +1294,7 @@ $(document).on('click', '.friends_cat_nav .cat-link', function () {
|
||||
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
|
||||
$('.friends_cat_nav .cat-link').removeClass('disabled');
|
||||
initializeMomentFold();
|
||||
initDoubanDetailLinks();
|
||||
|
||||
// 更新浏览器历史状态
|
||||
if (typeof url === 'string') {
|
||||
@@ -1503,6 +1502,7 @@ $(document).on('click', '#t_pagination a', function () {
|
||||
initAgree();
|
||||
if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
|
||||
initializeMomentFold();
|
||||
initDoubanDetailLinks();
|
||||
syncPageParamToUrl(currentPage);
|
||||
} else {
|
||||
$('#t_pagination a').hide();
|
||||
@@ -1548,6 +1548,9 @@ $(document).ready(function () {
|
||||
paginationSelector: '#p_pagination'
|
||||
});
|
||||
|
||||
$photosItem.empty();
|
||||
$('#p_pagination a').hide();
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
@@ -3114,26 +3117,7 @@ function anianxSpeedFetchXiehouyuWithTimeout(timeout) {
|
||||
}
|
||||
|
||||
function initjump() {
|
||||
// 功能1:自定义页面tag接管(后续在自定义测实现,当前为过度)
|
||||
const targetPaths = ['/douban'];
|
||||
const pathname = window.location.pathname;
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const activeTag = urlParams.get('tag')?.trim();
|
||||
// 同时存在tag、且当前路径在集合内,才执行点击逻辑,不满足直接跳过
|
||||
if (activeTag && targetPaths.includes(pathname)) {
|
||||
// 统一导航按钮选择器
|
||||
const navSelector = '.douban_cat_nav ul li a';
|
||||
const targetLink = $(navSelector).filter(function () {
|
||||
const linkText = $(this).clone().find('span').remove().end().text().trim();
|
||||
return linkText === activeTag;
|
||||
});
|
||||
// 匹配到元素则模拟点击
|
||||
if (targetLink.length) {
|
||||
targetLink.trigger('click');
|
||||
}
|
||||
}
|
||||
|
||||
// 功能2:登录登出、发布更新等操作后,显示提示信息
|
||||
// 登录登出、发布更新等操作后,显示提示信息
|
||||
let closeLoading = null;
|
||||
const loadType = $.cookie('load_type');
|
||||
if (loadType) {
|
||||
|
||||
Reference in New Issue
Block a user