From 4bec1314facc0f76150d6ef4a94f05d31dd4f3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 1 Apr 2020 09:31:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/datares/datares.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/business/jxutils/datares/datares.go b/business/jxutils/datares/datares.go index edeab5a48..65ce159ca 100644 --- a/business/jxutils/datares/datares.go +++ b/business/jxutils/datares/datares.go @@ -80,10 +80,14 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h if err != nil { return nil, err } + fmt.Println("test11111111111111111") + img.Bounds().Dx() if imgType == model.ImgTypeMain { + fmt.Println("test222222222222222222222") 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, @@ -92,9 +96,7 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h MainURL: resourceURL, UseType: int8(imgType), } - fmt.Println("test222222222222222222222") vendorID := jxutils.GuessDataResourceVendor(resourceURL) - fmt.Println("test11111111111111111111", vendorID) switch vendorID { case model.VendorIDQiNiuCloud: dataRes.QiniuURL = resourceURL