diff --git a/server_api/product.api b/server_api/product.api index a2a371bb..5f586731 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -46,6 +46,9 @@ service product { //获取列表页推荐产品列表 @handler HomePageRecommendProductListHandler get /api/product/home_page_recommend(HomePageRecommendProductListReq) returns (response); + //获取产品详情(重构版) + @handler GetProductDetailHandler + get /api/product/get_product_detail(GetProductDetailReq) returns (response); } //获取详情页推荐产品列表 @@ -221,4 +224,58 @@ type HomePageRecommendProductListRsp { CoverDefault []CoverDefaultItem `json:"cover_default"` HaveOptionalFitting bool `json:"have_optional_fitting"` IsCustomization int64 `json:"is_customization"` +} + +//获取产品详情(重构版) +type GetProductDetailReq{ + ProductId int64 `form:"product_id"`//产品id + TemplateTag string `form:"template_tag"` //模板标签 + SelectColorIndex int `form:"select_color_index"` //模板标签颜色索引 +} +type GetProductDetailRsp{ + TemplateTagColorInfo TemplateTagColorInfo `json:"template_tag_color_info"` //标签颜色信息 + ProductInfo ProductInfo `json:"product_info"` //产品基本信息 + BaseColors interface{} `json:"base_colors"` //一些返回写死的颜色 + SizeInfo SizeInfo `json:"size_info"` //尺寸相关信息 +} +type SizeInfo{ + SizeId int64 `json:"size_id"` + Title interface{} `json:"title"` + Capacity string `json:"capacity"` + PartsCanDeleted bool `json:"parts_can_deleted"` + ModelId int64 `json:"model_id"` + IsHot int64 `json:"is_hot"` + MinPrice string `json:"min_price"` + IsDefault bool `json:"is_default"` + TemplateInfo TemplateInfo `json:"template_info"` + ModelInfo ModelInfo `json:"model_info"` +} +type ModelInfo{ + ModelId int64 `json:"model_id"` //模型id + ModelDesignInfo interface{} `json:"design_info"` //模型设计信息 + LightInfo LightInfo `json:"light_info"` //灯光信息 +} +type LightInfo{ + LightId int64 `json:"light_id"` //灯光id + LightName string `json:"light_name"` //灯光组名称 + LightDesignInfo interface{} `json:"light_design_info"` //灯光设计信息 +} +type TemplateInfo { + TemplateSwitchInfo interface{} `json:"template_switch_info"` //对应模板标签下模板的开关信息,同列表页 + CombineIsVisible bool `json:"combine_is_visible"` //合图开关是否开启 + Material string `json:"material"` //默认素材 +} +type ProductInfo{ + ProductId int64 `json:"product_id"` //产品id + ProductType int64 `json:"product_type"` //产品类型id + ProductTypeName string `json:"product_type_name"` //产品类型名称 + Title string `json:"title"` //产品标题 + IsEnv int64 `json:"is_env"` //是否环保 + IsMicro int64 `json:"is_micro"` //是否可微波炉 + IsCustomization int64 `json:"is_customization"` //是否可定制产品 +} +type TemplateTagColorInfo{ + Colors []string `json:"colors"` + SelectedColorIndex int `json:"selected_color_index"` + TemplateTagGroups interface{} `json:"template_tag_groups"` } \ No newline at end of file