顶部
${item.name || '期刊封面'}
${item.issn || ''}
${item.name || ''}
`; $wrapper.append(slide); }); } else { // 无数据兜底 $wrapper.append(`
暂无${type === 'qk_sci' ? 'SCI' : (type === 'qk_cssci' ? 'CSSCI' : '中国科技期刊卓越行动计划')}期刊数据
`); } // 优化Swiper重置:仅更新内容,不重复销毁(避免性能问题) journalSwiper.updateSlides(); // 更新slide数量 journalSwiper.slideTo(0); // 回到第一个slide journalSwiper.autoplay.start(); // 重启自动播放 $(".journal-swiper .swiper-btn .icon-pause").removeClass('pause'); // 重置按钮样式 } });
${address}
` : ''; const dateLine = dateDisplay ? `
${dateDisplay}
` : ''; const postDesc = isPostSource ? (item.description || '') : ''; const postDate = isPostSource ? `
${dateDisplay}
` : ''; const infoLine = isPostSource ? `
${postDesc}
` : `
${dateLine} ${locationLine}
`; var str = `
力争建成具有相当规模和较高学术竞争力
${postDate}
${title}
${infoLine}
`; box.innerHTML += str; } // 更新Swiper以显示新添加的slides if (window.eventSwiper) { window.eventSwiper.update(); window.eventSwiper.slideTo(0); } } if (isNumericGroupId) { $.ajax({ url: `${CATEGORY_API_BASE}/${currentGroupId}/postList`, data: { page: currentPage, limit: pageSize }, dataType: "json", type: 'get', success: function (e) { if (e && e.code === 200) { const items = Array.isArray(e.data) ? e.data : (Array.isArray(e.data?.data) ? e.data.data : []); renderSlides(items, true); } } }); } else { $.ajax({ url: "https://qk.sjtu.edu.cn/api/actvt", data: {cmd:'getActvts',page:currentPage,pagesize:pageSize,lang:'cn'}, dataType: "json", type: 'get', success: function (e) { if (e && e.code === 200) { var actvts = e.data.data.actvts renderSlides(actvts, false); } } }); } } // getActvts() //已在 ready() 函数中调用
页面按栏目组织。可先看导读,再进入相关篇目或返回列表。