storename

This commit is contained in:
苏尹岚
2020-12-03 11:51:18 +08:00
parent 7d6bc7e68a
commit 2937ad574c

View File

@@ -1620,17 +1620,18 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
data2, _, _ := jxutils.DownloadFileByURL(store.Licence)
fileName := store.Licence[strings.LastIndex(store.Licence, "/")+1 : len(store.Licence)]
url2, _ := api.JdShop2API.UploadImageNew(data2, fileName)
if strings.Contains(v.StoreName, "") {
v.StoreName = v.StoreName[0:strings.Index(v.StoreName, "")] + v.StoreName[strings.Index(v.StoreName, "")+3:len(v.StoreName)]
storeName := store.Name
if strings.Contains(storeName, "") {
storeName = storeName[0:strings.Index(storeName, "")] + storeName[strings.Index(storeName, "")+3:len(storeName)]
}
if strings.Contains(v.StoreName, ".") {
v.StoreName = v.StoreName[0:strings.Index(v.StoreName, ".")] + v.StoreName[strings.Index(v.StoreName, ".")+1:len(v.StoreName)]
if strings.Contains(storeName, ".") {
storeName = storeName[0:strings.Index(storeName, ".")] + storeName[strings.Index(storeName, ".")+1:len(storeName)]
}
if strings.Contains(v.StoreName, "-") {
v.StoreName = v.StoreName[0:strings.Index(v.StoreName, "-")] + v.StoreName[strings.Index(v.StoreName, "-")+1:len(v.StoreName)]
if strings.Contains(storeName, "-") {
storeName = storeName[0:strings.Index(storeName, "-")] + storeName[strings.Index(storeName, "-")+1:len(storeName)]
}
param := &jdshopapi.UpdateBasicParam{
StoreName: "京西菜市" + strings.ReplaceAll(v.StoreName, "店", "") + "生鲜店",
StoreName: "京西菜市" + strings.ReplaceAll(storeName, "店", "") + "生鲜店",
CategoryID2: 62,
Coordinate: utils.Float64ToStr(jxutils.IntCoordinate2Standard(store.Lat)) + "," + utils.Float64ToStr(jxutils.IntCoordinate2Standard(store.Lng)),
BussinessBeginTime: int2TimeStr(int(store.OpenTime1)),