商品支持有两张图片
This commit is contained in:
@@ -235,6 +235,18 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, storeID i
|
||||
}
|
||||
|
||||
func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate bool) (params map[string]interface{}) {
|
||||
photos := []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"is_master": true,
|
||||
"url": storeSku.Img,
|
||||
},
|
||||
}
|
||||
if storeSku.Img2 != "" {
|
||||
photos = append(photos, map[string]interface{}{
|
||||
"is_master": false,
|
||||
"url": storeSku.Img2,
|
||||
})
|
||||
}
|
||||
params = map[string]interface{}{
|
||||
"name": utils.LimitMixedStringLen(storeSku.SkuName, ebaiapi.MaxSkuNameByteCount),
|
||||
"left_num": model.MaxStoreSkuStockQty,
|
||||
@@ -244,12 +256,7 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate bool
|
||||
// "cat2_id": getEbaiCat(storeSku.VendorVendorCatID2, 2),
|
||||
"cat3_id": getEbaiCat(storeSku.VendorVendorCatID, 3),
|
||||
"weight": storeSku.Weight,
|
||||
"photos": []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"is_master": true,
|
||||
"url": storeSku.Img,
|
||||
},
|
||||
},
|
||||
"photos": photos,
|
||||
}
|
||||
if storeSku.DescImg != "" {
|
||||
params["rtf"] = storeSku.DescImg
|
||||
|
||||
Reference in New Issue
Block a user