11
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"fusenapi/constants"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/template_switch_info"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
|
||||
@@ -111,36 +112,7 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
||||
}*/
|
||||
modelInfo := modelList[modelIndex]
|
||||
mapKey := fmt.Sprintf("_%d", *modelInfo.SizeId)
|
||||
rsp[mapKey] = map[string]interface{}{
|
||||
"id": templateInfo.Id,
|
||||
"material": *templateInfo.MaterialImg,
|
||||
//写死的数据
|
||||
"material_data": map[string]interface{}{
|
||||
"QRcode": map[string]interface{}{
|
||||
"if_show": true,
|
||||
"text": "qrcode",
|
||||
"default_value": "default qrcode",
|
||||
},
|
||||
"Website": map[string]interface{}{
|
||||
"if_show": true,
|
||||
"text": "website",
|
||||
"default_value": "default website",
|
||||
},
|
||||
"Address": map[string]interface{}{
|
||||
"if_show": true,
|
||||
"text": "address",
|
||||
"default_value": "default address",
|
||||
},
|
||||
"Phone": map[string]interface{}{
|
||||
"if_show": true,
|
||||
"text": "phone",
|
||||
"default_value": "17557283679",
|
||||
},
|
||||
"Logo": map[string]interface{}{
|
||||
"material": "/image/logo/aHnT1_rzubdwax_scale.png",
|
||||
},
|
||||
},
|
||||
}
|
||||
rsp[mapKey] = template_switch_info.GetTemplateSwitchInfo(templateInfo.Id, *templateInfo.MaterialImg)
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", rsp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user