fix
This commit is contained in:
parent
ffc555ca76
commit
74f25d23cf
|
@ -172,6 +172,9 @@ func (w *wsConnectItem) renderImage(data []byte) {
|
||||||
if renderImageData.RenderData.Qrcode == "" && templateSwitchInfo.MaterialData.QRcode.IfShow {
|
if renderImageData.RenderData.Qrcode == "" && templateSwitchInfo.MaterialData.QRcode.IfShow {
|
||||||
renderImageData.RenderData.Qrcode = templateSwitchInfo.MaterialData.QRcode.DefaultValue
|
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{
|
combineReq := repositories.LogoCombineReq{
|
||||||
|
|
|
@ -16,6 +16,7 @@ type MaterialData struct {
|
||||||
Website Website `json:"Website"`
|
Website Website `json:"Website"`
|
||||||
Address Address `json:"Address"`
|
Address Address `json:"Address"`
|
||||||
Phone Phone `json:"Phone"`
|
Phone Phone `json:"Phone"`
|
||||||
|
Slogan Slogan `json:"slogan"`
|
||||||
Logo Logo `json:"Logo"`
|
Logo Logo `json:"Logo"`
|
||||||
}
|
}
|
||||||
type QRcode struct {
|
type QRcode struct {
|
||||||
|
@ -33,6 +34,11 @@ type Address struct {
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
DefaultValue string `json:"default_value"`
|
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 {
|
type Phone struct {
|
||||||
IfShow bool `json:"if_show"`
|
IfShow bool `json:"if_show"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
|
@ -87,7 +93,7 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
|
||||||
mapSwitchInfo.MaterialData.Phone = Phone{
|
mapSwitchInfo.MaterialData.Phone = Phone{
|
||||||
IfShow: v.Visible,
|
IfShow: v.Visible,
|
||||||
Text: v.Text,
|
Text: v.Text,
|
||||||
DefaultValue: "xxx xxx xxx xxxx",
|
DefaultValue: "000 xxx xxx 1111",
|
||||||
}
|
}
|
||||||
case "Address": //地址
|
case "Address": //地址
|
||||||
mapSwitchInfo.MaterialData.Address = Address{
|
mapSwitchInfo.MaterialData.Address = Address{
|
||||||
|
@ -105,7 +111,13 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
|
||||||
mapSwitchInfo.MaterialData.QRcode = QRcode{
|
mapSwitchInfo.MaterialData.QRcode = QRcode{
|
||||||
IfShow: v.Visible,
|
IfShow: v.Visible,
|
||||||
Text: v.Text,
|
Text: v.Text,
|
||||||
DefaultValue: "xxxxxxx",
|
DefaultValue: "qrcode xxxxxxx",
|
||||||
|
}
|
||||||
|
case "Slogan":
|
||||||
|
mapSwitchInfo.MaterialData.Slogan = Slogan{
|
||||||
|
IfShow: v.Visible,
|
||||||
|
Text: v.Text,
|
||||||
|
DefaultValue: "slogan xxxxxxx",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user