时间线操作行补真实计数(评论数 / 浏览数),classic 首页同步加操作行

- posts 表加 view_count 列(迁移自动补列),公开文章详情每被拉取 +1;
  列表接口子查询带出非删除评论数
- classic 首页文章卡补上操作行(回复 / 赞 / 查看),与 vivid 同行为:
  回复跳评论区锚点、赞本机 localStorage、查看进详情;
  卡片底部 meta 行的日期不再重复包「查看」链接
- vivid 操作行的回复 / 查看旁展示对应计数(万以上缩写)
This commit is contained in:
Sakurasan committed 2026-10-08 00:15:34 +08:00
1 parent 7171c95275
commit 916dd74034
6 files changed
+102 -12

No files matched your search

+7
View File
@@ -84,6 +84,13 @@ const longDateFmt = new Intl.DateTimeFormat('zh-CN', {
})
const shortDateFmt = new Intl.DateTimeFormat('sv-SE') // YYYY-MM-DD
// 操作行的计数展示:万以上缩写,避免一长串数字压弯布局
export function fmtCount(n) {
const v = Number(n) || 0
if (v >= 10000) return (v / 10000).toFixed(1).replace(/\.0$/, '') + '万'
return String(v)
}
export function formatDate(iso) {
if (!iso) return ''
const d = new Date(iso)