改为使用京东的图片

This commit is contained in:
苏尹岚
2020-04-01 09:47:57 +08:00
parent 54248a385f
commit 377c64707a
2 changed files with 2 additions and 6 deletions

View File

@@ -4147,8 +4147,8 @@ func CreateSkusAndFocusFromYb(ctx *jxcontext.Context, isAsync, isContinueWhenErr
skuNameExt.Skus[0].Weight = int(utils.Str2Int64(utils.Float64ToStr(float64(productInfo.Weight))))
skuNameExt.Skus[0].Status = model.SkuStatusNormal
}
if len(v.PictureList) > 0 {
skuNameExt.Img = v.PictureList[0]
if len(productInfo.ImgList) > 0 {
skuNameExt.Img = productInfo.ImgList[0]
}
outSkuNameExt, err := AddSkuName(ctx, skuNameExt, ctx.GetUserName())
if err != nil {

View File

@@ -80,14 +80,10 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h
if err != nil {
return nil, err
}
fmt.Println("test11111111111111111")
if imgType == model.ImgTypeMain {
fmt.Println("test222222222222222222222")
fmt.Println(img.Bounds().Dx(), img.Bounds().Dy())
if img.Bounds().Dx() != MainImgWidth || img.Bounds().Dy() != MainImgHeight {
return nil, fmt.Errorf("图片大小:%dx%d非法要求必须:%dx%d", img.Bounds().Dx(), img.Bounds().Dy(), MainImgWidth, MainImgHeight)
}
fmt.Println("test33333333333333333333333333")
}
dataRes = &model.DataResource{
Name: name,