...
|
...
|
@@ -107,40 +107,45 @@ const _pageArticleContent = (articleContent, isApp, gender) => { |
|
|
let callArtGoodGroup = (ii, len2) => {
|
|
|
if (ii < len2) {
|
|
|
let goods = art.goodsGroup.data[ii];
|
|
|
let good = {
|
|
|
thumb: goods.cover ? helpers.image(goods.cover.cover, 235, 314) : '',
|
|
|
type: goods.cover ? guangProcess.getProductIcon(goods.cover.maxSortId) : '',
|
|
|
goods: []
|
|
|
};
|
|
|
let skns = [];
|
|
|
let arr = [];
|
|
|
|
|
|
goods.list.forEach((mini) => {
|
|
|
skns.push(mini.id);
|
|
|
arr[mini.id] = mini.src;
|
|
|
});
|
|
|
|
|
|
// 通过SKN获取商品信息
|
|
|
productDetailModel.productInfoBySkns(skns).then((product) => {
|
|
|
if (product && product.data && product.data.product_list) {
|
|
|
let g = [];
|
|
|
|
|
|
product.data.product_list.forEach(_ => {
|
|
|
g.push(guangProcess.formatProduct(_, false, true, true, 235, 314, isApp, gender));
|
|
|
});
|
|
|
g.forEach(p => {
|
|
|
if (arr[p.id]) {
|
|
|
p.thumb = helpers.image(arr[p.id], 235, 314);
|
|
|
good.goods.push(p);
|
|
|
if (goods) {
|
|
|
let good = {
|
|
|
thumb: goods.cover ? helpers.image(goods.cover.cover, 235, 314) : '',
|
|
|
type: goods.cover ? guangProcess.getProductIcon(goods.cover.maxSortId) : '',
|
|
|
goods: []
|
|
|
};
|
|
|
let skns = [];
|
|
|
let arr = [];
|
|
|
|
|
|
goods.list.forEach((mini) => {
|
|
|
skns.push(mini.id);
|
|
|
arr[mini.id] = mini.src;
|
|
|
});
|
|
|
|
|
|
// 通过SKN获取商品信息
|
|
|
productDetailModel.productInfoBySkns(skns).then((product) => {
|
|
|
if (product && product.data && product.data.product_list) {
|
|
|
let g = [];
|
|
|
|
|
|
product.data.product_list.forEach(_ => {
|
|
|
g.push(guangProcess.formatProduct(_, false, true, true, 235, 314, isApp, gender));
|
|
|
});
|
|
|
g.forEach(p => {
|
|
|
if (arr[p.id]) {
|
|
|
p.thumb = helpers.image(arr[p.id], 235, 314);
|
|
|
good.goods.push(p);
|
|
|
}
|
|
|
});
|
|
|
if (!build.collocation) {
|
|
|
build.collocation = [];
|
|
|
}
|
|
|
});
|
|
|
if (!build.collocation) {
|
|
|
build.collocation = [];
|
|
|
build.collocation.push(good);
|
|
|
}
|
|
|
build.collocation.push(good);
|
|
|
}
|
|
|
callArtGoodGroup(++ii, len2);
|
|
|
});
|
|
|
} else {
|
|
|
callArtGoodGroup(++ii, len2);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
contents.push(build);
|
|
|
joinContentFunc(++i, len);
|
...
|
...
|
|