72 lines
1.8 KiB
Go
72 lines
1.8 KiB
Go
package template_switch_info
|
|
|
|
type GetTemplateSwitchInfoRsp struct {
|
|
Id int64 `json:"id"`
|
|
Material string `json:"material"`
|
|
MaterialData MaterialData `json:"material_data"`
|
|
}
|
|
type MaterialData struct {
|
|
QRcode QRcode `json:"QRcode"`
|
|
Website Website `json:"Website"`
|
|
Address Address `json:"Address"`
|
|
Phone Phone `json:"Phone"`
|
|
Logo Logo `json:"Logo"`
|
|
}
|
|
type QRcode struct {
|
|
IfShow bool `json:"if_show"`
|
|
Text string `json:"text"`
|
|
DefaultValue string `json:"default_value"`
|
|
}
|
|
type Website struct {
|
|
IfShow bool `json:"if_show"`
|
|
Text string `json:"text"`
|
|
DefaultValue string `json:"default_value"`
|
|
}
|
|
type Address 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"`
|
|
DefaultValue string `json:"default_value"`
|
|
}
|
|
type Logo struct {
|
|
Material string `json:"material"`
|
|
}
|
|
|
|
// 获取模板开关信息(目前写死,以后后台做好了功能再更新变动)
|
|
func GetTemplateSwitchInfo(templateId int64, templateMaterialImg string) GetTemplateSwitchInfoRsp {
|
|
return GetTemplateSwitchInfoRsp{
|
|
Id: templateId,
|
|
Material: templateMaterialImg,
|
|
MaterialData: MaterialData{
|
|
QRcode: QRcode{
|
|
IfShow: true,
|
|
Text: "qrcode",
|
|
DefaultValue: "default qrcode",
|
|
},
|
|
Website: Website{
|
|
IfShow: true,
|
|
Text: "website",
|
|
DefaultValue: "default website",
|
|
},
|
|
Address: Address{
|
|
IfShow: true,
|
|
Text: "address",
|
|
DefaultValue: "default address",
|
|
},
|
|
Phone: Phone{
|
|
IfShow: true,
|
|
Text: "phone",
|
|
DefaultValue: "17557283679",
|
|
},
|
|
Logo: Logo{
|
|
Material: "/image/logo/aHnT1_rzubdwax_scale.png",
|
|
},
|
|
},
|
|
}
|
|
|
|
}
|