feat(cms): 案例/文章列表与详情改读 publishTime

配合后端拆出独立的 publish_time 列(见 ADR 0016)。

- 案例列表/详情、文章列表/详情统一取 publishTime,不再回退 createTime
  (createTime 是系统记录时间,运营没设过,展示它等于显示错误值)
- 案例详情页标签由「项目时间」更正为「发布时间」,并补 dayjs 格式化
  (原先直出 2026-09-23 19:06:37 完整时间戳)
- server/utils/case.ts 废弃 projectTime,改为输出 publishTime
- CaseItem 类型同步

仅改 template-07:其余 9 套模板的 CaseDetail 仍读已废弃的 projectTime,
因 CaseItem 带索引签名不会报编译错误,只会在换模板时静默显示创建时间。
该技术债已记入 docs/adr/0016 的「后果」一节,换模板前须先补这 9 套。
This commit is contained in:
2026-09-29 03:36:04 +08:00
parent 8e9969d516
commit cfe0749aff
6 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
<NuxtLink :to="`/case/${item.id}`" class="block py-4 group">
<div class="flex items-baseline gap-4">
<span class="shrink-0 text-xs text-gray-400 tabular-nums">
{{ formatDate(item.projectTime || item.createTime) }}
{{ formatDate(item.publishTime) }}
</span>
<h2 class="flex-1 min-w-0 text-base text-gray-900 truncate group-hover:text-blue-600 transition-colors">
{{ item.title }}