This commit is contained in:
laodaming 2023-09-27 10:16:40 +08:00
parent 6c53238457
commit e6bd26a775

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 {