fix
This commit is contained in:
parent
1f36e62727
commit
f8c86b1f03
|
@ -104,17 +104,41 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, fmt.Sprintf("failed to parse json product template info(may be old data):%d", templateInfo.Id))
|
return resp.SetStatusWithMessage(basic.CodeJsonErr, fmt.Sprintf("failed to parse json product template info(may be old data):%d", templateInfo.Id))
|
||||||
}
|
}
|
||||||
//后台隐藏/显示信息
|
//后台隐藏/显示信息(现在下面是写死了)
|
||||||
var switchInfo interface{}
|
/*var switchInfo interface{}
|
||||||
if templateInfo.SwitchInfo != nil && *templateInfo.SwitchInfo != "" {
|
if templateInfo.SwitchInfo != nil && *templateInfo.SwitchInfo != "" {
|
||||||
_ = json.Unmarshal([]byte(*templateInfo.SwitchInfo), &switchInfo)
|
_ = json.Unmarshal([]byte(*templateInfo.SwitchInfo), &switchInfo)
|
||||||
}
|
}*/
|
||||||
modelInfo := modelList[modelIndex]
|
modelInfo := modelList[modelIndex]
|
||||||
mapKey := fmt.Sprintf("_%d", *modelInfo.SizeId)
|
mapKey := fmt.Sprintf("_%d", *modelInfo.SizeId)
|
||||||
rsp[mapKey] = map[string]interface{}{
|
rsp[mapKey] = map[string]interface{}{
|
||||||
"id": templateInfo.Id,
|
"id": templateInfo.Id,
|
||||||
"material": *templateInfo.MaterialImg,
|
"material": *templateInfo.MaterialImg,
|
||||||
"material_data": switchInfo,
|
"material_data": map[string]interface{}{
|
||||||
|
"QRcode": map[string]interface{}{
|
||||||
|
"if_show": true,
|
||||||
|
"text": "二维码",
|
||||||
|
"default_val": "默认二维码",
|
||||||
|
},
|
||||||
|
"website": map[string]interface{}{
|
||||||
|
"if_show": true,
|
||||||
|
"text": "网站",
|
||||||
|
"default_val": "默认网站",
|
||||||
|
},
|
||||||
|
"slogan": map[string]interface{}{
|
||||||
|
"if_show": true,
|
||||||
|
"text": "slogan",
|
||||||
|
"default_val": "默认slogan",
|
||||||
|
},
|
||||||
|
"phone": map[string]interface{}{
|
||||||
|
"if_show": true,
|
||||||
|
"text": "phone",
|
||||||
|
"default_val": "默认phone",
|
||||||
|
},
|
||||||
|
"logo": map[string]interface{}{
|
||||||
|
"material": "/image/logo/aHnT1_rzubdwax_scale.png",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", rsp)
|
return resp.SetStatusWithMessage(basic.CodeOK, "success", rsp)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user