This commit is contained in:
苏尹岚
2020-12-03 14:15:54 +08:00
parent 068ede19e7
commit ebe859cebf

View File

@@ -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)]