This commit is contained in:
momo 2023-08-21 14:59:21 +08:00
parent 5e251e9868
commit 7e96383530

View File

@ -281,6 +281,8 @@ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardR
json.Unmarshal([]byte(*resourceInfo.Metadata), &logoStandardMetaData)
}
// 取出参数
ismaxProportion = logoStandardMetaData.Result.IsmaxProportion
imgColor = logoStandardMetaData.Result.ImgColor
return &LogoStandardRes{
ResourceId: resourceInfo.ResourceId,
@ -360,6 +362,20 @@ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardR
imgColor = append(imgColor, v.(string))
}
var logoStandardRes LogoStandardRes
logoStandardRes.IsmaxProportion = ismaxProportion
logoStandardRes.ImgColor = imgColor
logoStandardMetaData.Param = *in
logoStandardMetaData.Result = logoStandardRes
metadataB, err := json.Marshal(logoStandardMetaData)
if err != nil {
logx.Error(err)
return nil, err
}
var metadata = string(metadataB)
// 上传文件
var upload = file.Upload{
Ctx: ctx,
@ -372,6 +388,7 @@ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardR
FileData: fileBase,
UploadBucket: 1,
ApiType: 2,
Metadata: metadata,
})
if err != nil {
logx.Error(err)