From e6bd26a77562f269829ca9e4184573ff14e9c6aa Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 27 Sep 2023 10:16:40 +0800 Subject: [PATCH] fix --- utils/template_switch_info/template_switch.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/utils/template_switch_info/template_switch.go b/utils/template_switch_info/template_switch.go index 3ccf3910..260509e5 100644 --- a/utils/template_switch_info/template_switch.go +++ b/utils/template_switch_info/template_switch.go @@ -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 {