This commit is contained in:
laodaming 2023-09-11 15:15:38 +08:00
parent ffc555ca76
commit 74f25d23cf
2 changed files with 17 additions and 2 deletions

View File

@ -172,6 +172,9 @@ func (w *wsConnectItem) renderImage(data []byte) {
if renderImageData.RenderData.Qrcode == "" && templateSwitchInfo.MaterialData.QRcode.IfShow {
renderImageData.RenderData.Qrcode = templateSwitchInfo.MaterialData.QRcode.DefaultValue
}
if renderImageData.RenderData.Slogan == "" && templateSwitchInfo.MaterialData.Slogan.IfShow {
renderImageData.RenderData.Slogan = templateSwitchInfo.MaterialData.Slogan.DefaultValue
}
}
//获取刀版图
combineReq := repositories.LogoCombineReq{

View File

@ -16,6 +16,7 @@ type MaterialData struct {
Website Website `json:"Website"`
Address Address `json:"Address"`
Phone Phone `json:"Phone"`
Slogan Slogan `json:"slogan"`
Logo Logo `json:"Logo"`
}
type QRcode struct {
@ -33,6 +34,11 @@ type Address struct {
Text string `json:"text"`
DefaultValue string `json:"default_value"`
}
type Slogan struct {
IfShow bool `json:"if_show"`
Text string `json:"text"`
DefaultValue string `json:"default_value"`
}
type Phone struct {
IfShow bool `json:"if_show"`
Text string `json:"text"`
@ -87,7 +93,7 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
mapSwitchInfo.MaterialData.Phone = Phone{
IfShow: v.Visible,
Text: v.Text,
DefaultValue: "xxx xxx xxx xxxx",
DefaultValue: "000 xxx xxx 1111",
}
case "Address": //地址
mapSwitchInfo.MaterialData.Address = Address{
@ -105,7 +111,13 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
mapSwitchInfo.MaterialData.QRcode = QRcode{
IfShow: v.Visible,
Text: v.Text,
DefaultValue: "xxxxxxx",
DefaultValue: "qrcode xxxxxxx",
}
case "Slogan":
mapSwitchInfo.MaterialData.Slogan = Slogan{
IfShow: v.Visible,
Text: v.Text,
DefaultValue: "slogan xxxxxxx",
}
}
}