合图调整

This commit is contained in:
momo
2023-11-22 15:01:19 +08:00
parent ead94222b6
commit ab153ea15b
4 changed files with 42 additions and 29 deletions

View File

@@ -127,15 +127,16 @@ type (
ProductTemplateV2Info *gmodel.FsProductTemplateV2 `json:"product_template_v2_info"`
ProductTemplateTagGroups interface{} `json:"product_template_tag_groups"`
TemplateTag string `json:"template_tag"`
Website string `json:"website"` // 合图参数
Slogan string `json:"slogan"` // 合图参数
Address string `json:"address"` // 合图参数
Phone string `json:"phone"` // 合图参数
Qrcode string `json:"qrcode"` // 合图参数
LogoUrl string `json:"logo_url"` // 合图参数
Resolution string `json:"resolution"` // 合图参数
TemplateTagColor TemplateTagColor `json:"template_tag_color"` // 合图颜色
Debug *auth.Debug `json:"debug"`
Website *string `json:"website"` // 合图参数
Slogan *string `json:"slogan"` // 合图参数
Address *string `json:"address"` // 合图参数
Phone *string `json:"phone"` // 合图参数
Qrcode *string `json:"qrcode"` // 合图参数
}
LogoCombineRes struct {
ResourceId string `json:"resource_id"`
@@ -226,11 +227,22 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
json.Unmarshal(*resLogoInfo.Metadata, &combineParam)
combineParam["resolution"] = in.Resolution
combineParam["template_tagid"] = in.TemplateTag
combineParam["website"] = in.Website
combineParam["slogan"] = in.Slogan
combineParam["phone"] = in.Phone
combineParam["address"] = in.Address
combineParam["qrcode"] = in.Qrcode
if in.Website != nil {
combineParam["website"] = *in.Website
}
if in.Slogan != nil {
combineParam["slogan"] = *in.Slogan
}
if in.Phone != nil {
combineParam["phone"] = *in.Phone
}
if in.Address != nil {
combineParam["address"] = *in.Address
}
if in.Qrcode != nil {
combineParam["qrcode"] = *in.Qrcode
}
combineParam["template_tag_selected"] = map[string]interface{}{
"template_tag": in.TemplateTag,
"color": in.TemplateTagColor.Color,