时间线操作行补真实计数(评论数 / 浏览数),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

+4
View File
@@ -35,6 +35,10 @@ type Post struct {
// LinkCard 是正文里第一个外链的预览卡片(发布时抓一次,存 posts.link_card)。
// nil = 没有链接或抓取失败,前台不渲染卡片。
LinkCard *LinkCard `json:"link_card,omitempty"`
// CommentCount 是非删除评论数(列表接口子查询带出,操作行「回复」旁展示)。
CommentCount int64 `json:"comment_count"`
// ViewCount 是浏览数(公开文章详情每次拉取 +1)。
ViewCount int64 `json:"view_count"`
}
// LinkCard 是链接预览卡片:由 internal/linkmeta 抓取,以 JSON 存在 posts 表里。