fix
This commit is contained in:
parent
ff1698a49c
commit
f739f7bc0e
|
@ -339,7 +339,7 @@ func (l *GetProductDetailLogic) getRenderDefaultSize(productId int64, templateTa
|
|||
|
||||
// 获取对应模板标签颜色信息
|
||||
func (l *GetProductDetailLogic) GetTemplateTagColor(req *types.GetProductDetailReq, userinfo *auth.UserInfo) (resp types.TemplateTagColorInfo, err error) {
|
||||
if req.SelectColorIndex < 0 {
|
||||
if req.SelectedColorIndex < 0 {
|
||||
return types.TemplateTagColorInfo{}, errors.New("param selected_color_index is invalid")
|
||||
}
|
||||
//根据logo查询素材资源
|
||||
|
@ -387,7 +387,7 @@ func (l *GetProductDetailLogic) GetTemplateTagColor(req *types.GetProductDetailR
|
|||
if !ok {
|
||||
return types.TemplateTagColorInfo{}, errors.New("the template tag is not found from this logo material`s metadata")
|
||||
}
|
||||
if req.SelectColorIndex >= len(colors) {
|
||||
if req.SelectedColorIndex >= len(colors) {
|
||||
return types.TemplateTagColorInfo{}, errors.New("select color index is out of range !!")
|
||||
}
|
||||
var templateTagGroups interface{}
|
||||
|
@ -399,7 +399,7 @@ func (l *GetProductDetailLogic) GetTemplateTagColor(req *types.GetProductDetailR
|
|||
}
|
||||
return types.TemplateTagColorInfo{
|
||||
Colors: colors,
|
||||
SelectedColorIndex: req.SelectColorIndex,
|
||||
SelectedColorIndex: req.SelectedColorIndex,
|
||||
TemplateTagGroups: templateTagGroups,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -170,10 +170,10 @@ type HomePageRecommendProductListRsp struct {
|
|||
}
|
||||
|
||||
type GetProductDetailReq struct {
|
||||
ProductId int64 `form:"product_id"` //产品id
|
||||
TemplateTag string `form:"template_tag"` //模板标签
|
||||
SelectColorIndex int `form:"select_color_index"` //模板标签颜色索引
|
||||
Logo string `form:"logo"` //logo地址
|
||||
ProductId int64 `form:"product_id"` //产品id
|
||||
TemplateTag string `form:"template_tag"` //模板标签
|
||||
SelectedColorIndex int `form:"selected_color_index"` //模板标签颜色索引
|
||||
Logo string `form:"logo"` //logo地址
|
||||
}
|
||||
|
||||
type GetProductDetailRsp struct {
|
||||
|
|
|
@ -206,10 +206,10 @@ type HomePageRecommendProductListRsp {
|
|||
|
||||
//获取产品详情(重构版)
|
||||
type GetProductDetailReq {
|
||||
ProductId int64 `form:"product_id"` //产品id
|
||||
TemplateTag string `form:"template_tag"` //模板标签
|
||||
SelectColorIndex int `form:"select_color_index"` //模板标签颜色索引
|
||||
Logo string `form:"logo"` //logo地址
|
||||
ProductId int64 `form:"product_id"` //产品id
|
||||
TemplateTag string `form:"template_tag"` //模板标签
|
||||
SelectedColorIndex int `form:"selected_color_index"` //模板标签颜色索引
|
||||
Logo string `form:"logo"` //logo地址
|
||||
}
|
||||
type GetProductDetailRsp {
|
||||
TemplateTagColorInfo TemplateTagColorInfo `json:"template_tag_color_info"` //标签颜色信息
|
||||
|
|
Loading…
Reference in New Issue
Block a user