From ebe859cebf9a9b52e0b299e3f22e6c79723bb347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 3 Dec 2020 14:15:54 +0800 Subject: [PATCH] aa --- business/jxstore/tempop/tempop.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index 8697c9b35..df04332f2 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1616,9 +1616,12 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { if !strings.Contains(ex, "00:00:00") { ex += " 00:00:00" } - data2, _, _ := jxutils.DownloadFileByURL(store.Licence) - fileName := store.Licence[strings.LastIndex(store.Licence, "/")+1 : len(store.Licence)] - url2, _ := api.JdShop2API.UploadImageNew(data2, fileName) + var url2 string + if store.Licence != "" { + data2, _, _ := jxutils.DownloadFileByURL(store.Licence) + fileName := store.Licence[strings.LastIndex(store.Licence, "/")+1 : len(store.Licence)] + url2, _ = api.JdShop2API.UploadImageNew(data2, fileName) + } storeName := store.Name if strings.Contains(storeName, "(") { storeName = storeName[0:strings.Index(storeName, "(")] + storeName[strings.Index(storeName, ")")+3:len(storeName)]