1
This commit is contained in:
@@ -930,6 +930,8 @@ func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg,
|
|||||||
SkuID: skuId,
|
SkuID: skuId,
|
||||||
VendorID: model.VendorIDDD,
|
VendorID: model.VendorIDDD,
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("===========imgs := %s", utils.Format4Output(imgs, false))
|
||||||
|
globals.SugarLogger.Debugf("===========tiktokImgList := %s", utils.Format4Output(tiktokImgList, false))
|
||||||
for k, v := range tiktokImgList {
|
for k, v := range tiktokImgList {
|
||||||
if strings.Contains(k, "detail_") {
|
if strings.Contains(k, "detail_") {
|
||||||
detailTiktok = v.ByteUrl
|
detailTiktok = v.ByteUrl
|
||||||
@@ -952,7 +954,7 @@ func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg,
|
|||||||
whiteTiktok = tiktokImg[0]
|
whiteTiktok = tiktokImg[0]
|
||||||
localTiktokObj.Img = whiteTiktok
|
localTiktokObj.Img = whiteTiktok
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("===========tiktokImg := %s", utils.Format4Output(tiktokImg, false))
|
||||||
switch len(tiktokImg) {
|
switch len(tiktokImg) {
|
||||||
case 1:
|
case 1:
|
||||||
localTiktokObj.Img2 = tiktokImg[0]
|
localTiktokObj.Img2 = tiktokImg[0]
|
||||||
@@ -968,8 +970,8 @@ func GetTiktokImgList(api *tiktokShop.API, storeId string, skuId int, detailImg,
|
|||||||
localTiktokObj.Img3 = tiktokImg[1]
|
localTiktokObj.Img3 = tiktokImg[1]
|
||||||
localTiktokObj.Img4 = tiktokImg[2]
|
localTiktokObj.Img4 = tiktokImg[2]
|
||||||
localTiktokObj.Img5 = tiktokImg[3]
|
localTiktokObj.Img5 = tiktokImg[3]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("===========localTiktokObj := %s", utils.Format4Output(localTiktokObj, false))
|
||||||
dao.CreateEntity(dao.GetDB(), localTiktokObj)
|
dao.CreateEntity(dao.GetDB(), localTiktokObj)
|
||||||
return strings.Join(tiktokImg, "|"), detailTiktok, whiteTiktok, nil
|
return strings.Join(tiktokImg, "|"), detailTiktok, whiteTiktok, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user