Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
momo 2023-09-27 11:11:52 +08:00
commit 6eccd11386

View File

@ -6,9 +6,10 @@ import (
)
type GetTemplateSwitchInfoRsp struct {
Id int64 `json:"id"`
Material string `json:"material"`
MaterialData MaterialData `json:"material_data"`
Id int64 `json:"id"`
Material string `json:"material"`
MaterialData MaterialData `json:"material_data"`
CombineIsVisible bool `json:"combine_is_visible"` //合图总开关是否开启
}
type MaterialData struct {
QRcode QRcode `json:"QRcode"`
@ -68,6 +69,7 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
Material: "/image/logo/aHnT1_rzubdwax_scale.png",
},
},
CombineIsVisible: false,
}
if templateJsonStr == nil || *templateJsonStr == "" {
return returnData
@ -78,7 +80,7 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
return returnData
}
for _, v := range templateJsonInfo.MaterialList {
if v.Type == "combine" && !v.Visible {
if v.Type == "combine" {
return GetTemplateSwitchInfoRsp{
Id: templateId,
Material: templateMaterialImg,
@ -87,6 +89,7 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
Material: "/image/logo/aHnT1_rzubdwax_scale.png",
},
},
CombineIsVisible: v.Visible,
}
}
switch v.Tag {