This commit is contained in:
laodaming 2023-10-20 10:47:24 +08:00
parent ff1698a49c
commit f739f7bc0e
3 changed files with 11 additions and 11 deletions

View File

@ -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
}

View File

@ -172,7 +172,7 @@ type HomePageRecommendProductListRsp struct {
type GetProductDetailReq struct {
ProductId int64 `form:"product_id"` //产品id
TemplateTag string `form:"template_tag"` //模板标签
SelectColorIndex int `form:"select_color_index"` //模板标签颜色索引
SelectedColorIndex int `form:"selected_color_index"` //模板标签颜色索引
Logo string `form:"logo"` //logo地址
}

View File

@ -208,7 +208,7 @@ type HomePageRecommendProductListRsp {
type GetProductDetailReq {
ProductId int64 `form:"product_id"` //产品id
TemplateTag string `form:"template_tag"` //模板标签
SelectColorIndex int `form:"select_color_index"` //模板标签颜色索引
SelectedColorIndex int `form:"selected_color_index"` //模板标签颜色索引
Logo string `form:"logo"` //logo地址
}
type GetProductDetailRsp {