update
This commit is contained in:
@ -66,10 +66,26 @@ func (q ArticleQuery) Offset() int { return (q.Page - 1) * q.Size }
|
||||
//
|
||||
// ID 是图片自身的编码 id(hashid,i=走秀单图 / j=街拍单图),供「单图收藏」定位到具体某一张;
|
||||
// 此前只有 image + name,前端无法稳定标识单张图片,故补充该字段。
|
||||
//
|
||||
// Image 与 Thumb 的关系:
|
||||
// - Image 是「该接口场景下的主用地址」——详情接口给展示样式(high),列表接口直接给缩略图(thumb,
|
||||
// 列表只需小图,不给大图以免浪费带宽)。
|
||||
// - Thumb 恒为缩略图地址(thumb 样式),**仅详情接口填充**:详情返回的是展示样式大图,
|
||||
// 但大图灯箱左栏缩略图条 / 右下角细节缩略图只要几十到一百多像素,用大图纯属浪费,
|
||||
// 故额外给出 Thumb 供这些「小尺寸场景」使用。列表接口不填(其 Image 本身就是缩略图)。
|
||||
type PublicArticleImage struct {
|
||||
ID string `json:"id"`
|
||||
Image string `json:"image"`
|
||||
Name string `json:"name"`
|
||||
ID string `json:"id"`
|
||||
Image string `json:"image"`
|
||||
Thumb string `json:"thumb,omitempty"`
|
||||
Name string `json:"name"`
|
||||
IsDetail uint8 `json:"is_detail"` // 0=主图 1=细节图(详情接口 images 仅含主图;细节在 Details 分组)
|
||||
LookIndex uint32 `json:"look_index"` // 细节图归属的主图序号(用于前端分组展开)
|
||||
}
|
||||
|
||||
// RunwayLookDetails 某个主图(look)对应的细节图集合,供详情页「细节入口」按需展开。
|
||||
type RunwayLookDetails struct {
|
||||
LookIndex uint32 `json:"look_index"` // 主图序号(与 images 中对应主图的 look_index 一致)
|
||||
Images []PublicArticleImage `json:"images"` // 该主图的细节图列表
|
||||
}
|
||||
|
||||
// PublicArticle 对外展示用的精简文章结构(走秀列表)。
|
||||
@ -90,7 +106,8 @@ type PublicArticle struct {
|
||||
|
||||
// PublicArticleDetail 对外只读文章详情:含正文与完整图片集,不暴露管理字段。
|
||||
//
|
||||
// 与列表一致,只返回前端渲染所需的字段;image_count / source_url / 各类时间季节元数据前端均不展示,已移除。
|
||||
// 与列表一致,只返回前端渲染所需的字段;后台管理用的额外元数据(季节 / 年份 / 系列等)
|
||||
// 见 AdminRunway,由后台列表接口单独返回。
|
||||
type PublicArticleDetail struct {
|
||||
UID string `json:"id"` // 编码后的文章 id(无序串)
|
||||
BrandUID string `json:"brand_id"` // 编码后的品牌 id(无序串)
|
||||
@ -98,8 +115,8 @@ type PublicArticleDetail struct {
|
||||
Description string `json:"description"`
|
||||
Cover string `json:"cover"`
|
||||
BrandName string `json:"brand_name"`
|
||||
SourceURL string `json:"source_url"` // 采集来源链接(后台溯源用,对外无害)
|
||||
Images []PublicArticleImage `json:"images"`
|
||||
Images []PublicArticleImage `json:"images"` // 仅主图(look 图),默认展示
|
||||
Details []RunwayLookDetails `json:"details"` // 按主图分组的细节图(「细节入口」展开用);无细节时为空
|
||||
}
|
||||
|
||||
// AdminRunway 后台管理用的走秀列表项:在 PublicArticle 基础上补回管理字段,
|
||||
@ -114,5 +131,4 @@ type AdminRunway struct {
|
||||
CollectionType string `json:"collection_type"` // rtw / menswear / couture / resort / pre_fall
|
||||
SeasonCode string `json:"season_code"` // SS26 / FW25 / RES26 / PF25
|
||||
ImageCount uint16 `json:"image_count"`
|
||||
SourceURL string `json:"source_url"` // 采集来源链接(去重 / 溯源用)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user