调整
This commit is contained in:
@@ -137,4 +137,85 @@ export function transform(leftData) {
|
||||
rightData.productDraftId = "";
|
||||
|
||||
return JSON.stringify(rightData);
|
||||
}
|
||||
|
||||
export function transformAliExpress(content) {
|
||||
let template = {
|
||||
cat1Id: 0,
|
||||
cat2Id: 0,
|
||||
cat3Id: 0,
|
||||
cat4Id: 0,
|
||||
cat5Id: 0,
|
||||
cat6Id: 0,
|
||||
cat7Id: 0,
|
||||
cat8Id: 0,
|
||||
cat9Id: 0,
|
||||
cat10Id: 0,
|
||||
materialMultiLanguages: [],
|
||||
productName: content.title,
|
||||
productPropertyReqs: [],
|
||||
productSkcReqs: [],
|
||||
productSpecPropertyReqs: [],
|
||||
carouselImageUrls: content.carouselImageUrls,
|
||||
carouselImageI18nReqs: [],
|
||||
materialImgUrl: content.carouselImageUrls[0],
|
||||
goodsLayerDecorationReqs: [],
|
||||
sizeTemplateIds: [],
|
||||
showSizeTemplateIds: [],
|
||||
goodsModelReqs: [],
|
||||
productWhExtAttrReq: {
|
||||
outerGoodsUrl: "",
|
||||
productOrigin: {
|
||||
countryShortName: "CN"
|
||||
}
|
||||
},
|
||||
productCarouseVideoReqList: [],
|
||||
goodsAdvantageLabelTypes: [],
|
||||
productDetailVideoReqList: [],
|
||||
productOuterPackageImageReqs: [],
|
||||
productOuterPackageReq: {},
|
||||
sensitiveTransNormalFileReqs: [],
|
||||
productGuideFileI18nReqs: [],
|
||||
productSaleExtAttrReq: {},
|
||||
productNonAuditExtAttrReq: {
|
||||
california65WarningInfoReq: {}
|
||||
},
|
||||
productDraftId: 0
|
||||
}
|
||||
|
||||
if (!!content.text) {
|
||||
template.goodsLayerDecorationReqs.push({
|
||||
floorId: null,
|
||||
lang: "zh",
|
||||
key: "DecImage",
|
||||
type: "text",
|
||||
priority: 0,
|
||||
contentList: [
|
||||
{
|
||||
text: content.text,
|
||||
textModuleDetails: {
|
||||
fontSize: 12,
|
||||
fontColor: "#333333",
|
||||
backgroundColor: "#ffffff",
|
||||
align: "left"
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
for (let i = 0; i < content.detailImageList.length; i++) {
|
||||
let imgList = []
|
||||
imgList.push({imgUrl: content.detailImageList[i]})
|
||||
template.goodsLayerDecorationReqs.push({
|
||||
floorId: null,
|
||||
lang: "zh",
|
||||
key: "DecImage",
|
||||
type: "image",
|
||||
priority: 0,
|
||||
contentList: imgList
|
||||
})
|
||||
}
|
||||
|
||||
return template
|
||||
}
|
||||
Reference in New Issue
Block a user