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
+3 -1
View File
@@ -417,7 +417,8 @@ export interface CaseItem {
categoryId?: number
categoryName?: string
clientName?: string
projectTime?: string
/** 发布时间:运营可见的对外时间,列表与详情展示、排序的锚点 */
publishTime?: string
tags?: string[]
sortNumber?: number
status?: number
@@ -425,6 +426,7 @@ export interface CaseItem {
top?: number
/** 推荐标识:1=推荐(当前上游 cms-case 表暂无此字段,预留以便后续版本自动生效) */
recommend?: number
/** 创建时间:系统记录时间,官网不展示 */
createTime?: string
updateTime?: string
[key: string]: unknown