From e6f2651704707820e4a0c5083c2d1c3ffe9ef5b3 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 11 Sep 2023 12:19:24 +0800 Subject: [PATCH] fix --- utils/template_switch_info/template_switch.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/template_switch_info/template_switch.go b/utils/template_switch_info/template_switch.go index 86a133cd..6e903ab3 100644 --- a/utils/template_switch_info/template_switch.go +++ b/utils/template_switch_info/template_switch.go @@ -54,12 +54,12 @@ type MaterialItem struct { } // 获取模板开关信息(目前写死,以后后台做好了功能再更新变动) -func GetTemplateSwitchInfo(templateId int64, templateInfo *string, templateMaterialImg string) (resp GetTemplateSwitchInfoRsp, err error) { - if templateInfo == nil || *templateInfo == "" { +func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMaterialImg string) (resp GetTemplateSwitchInfoRsp, err error) { + if templateJsonStr == nil || *templateJsonStr == "" { return GetTemplateSwitchInfoRsp{}, nil } var templateJsonInfo TemplateSimpleParseInfo - if err = json.Unmarshal([]byte(*templateInfo), &templateJsonInfo); err != nil { + if err = json.Unmarshal([]byte(*templateJsonStr), &templateJsonInfo); err != nil { logx.Error(err) return GetTemplateSwitchInfoRsp{}, errors.New("解析模板json获取DIY开关设置失败") }