zqlit
50a906e07c
perf(comments): 评论加载提速 + 骨架屏 + 友链弹窗 pjax 修复 + toast 统一 Message.js
优化:
- initArtalk 加节点级幂等守卫(mount.__atkInited,失败回滚),
消除 artalk.html/mypjax 多入口导致的 4× comments + 4× pv 重复请求
- fetch 包装层对无 body 的 GET/HEAD 去掉多余 content-type,
消掉 Artalk 对 GET /comments 的 CORS 预检(按完整 URL 缓存,
每篇文章都重付一次 RTT)。实测评论列表 +1150~1565ms → +626ms
修复:
- 评论列表骨架屏改注入 .atk-list-body(原骨架在 #Comments 内,
被 Artalk.init 清空),list-loaded/故障/12s 兜底移除
- 友链申请弹窗抽成 modules/friendlink.js 进 page-only bundle
(原内联脚本在 #pjax-container 外,pjax 后 flApplyOpenModal 未定义)
- toast 统一走本地化 Message.js/Qmsg 适配层(保留 window.Toast/showToast 旧 API)
文档:
- README / 架构总览 更新;新增 评论加载优化方案.md
2026-10-04 15:00:52 +08:00
..
2026-01-23 23:11:18 +08:00
2026-10-04 15:00:52 +08:00
2026-10-04 15:00:52 +08:00