...
|
...
|
@@ -319,12 +319,12 @@ const setBrandBanner = (base, brand, shop) => { |
|
|
*/
|
|
|
const setProductData = base => {
|
|
|
let resData = {
|
|
|
id: base.id,
|
|
|
id: base.productId,
|
|
|
name: base.productName,
|
|
|
brandName: _.has(base, 'brand.brandName') ? base.brand.brandName : '',
|
|
|
brandName: _.has(base, 'brandInfo.brandName') ? base.brandInfo.brandName : '',
|
|
|
intro: base.salesPhrase,
|
|
|
sellPrice: base.productPriceBo.salesPrice,
|
|
|
marketPrice: base.productPriceBo.marketPrice,
|
|
|
sellPrice: base.salesPrice,
|
|
|
marketPrice: base.marketPrice,
|
|
|
total: 0
|
|
|
};
|
|
|
|
...
|
...
|
@@ -350,7 +350,7 @@ const setProductData = base => { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (value.goodsImagesList) {
|
|
|
if (value.imagesList) {
|
|
|
group = {
|
|
|
name: value.colorName,
|
|
|
title: `${resData.name} ${value.colorName}`,
|
...
|
...
|
@@ -369,7 +369,7 @@ const setProductData = base => { |
|
|
}
|
|
|
|
|
|
// 商品颜色列表
|
|
|
_.forEach(value.goodsImagesList, function(subValue) {
|
|
|
_.forEach(value.imagesList, function(subValue) {
|
|
|
thumbs.push(subValue.imageUrl);
|
|
|
});
|
|
|
group.thumbs = thumbs;
|
...
|
...
|
@@ -390,17 +390,17 @@ const setProductData = base => { |
|
|
}
|
|
|
|
|
|
// 商品尺码列表
|
|
|
_.forEach(value.goodsSizeBoList, function(subValue) {
|
|
|
_.forEach(value.sizeList, function(subValue) {
|
|
|
let size = {
|
|
|
name: subValue.sizeName,
|
|
|
title: subValue.sizeName,
|
|
|
sku: subValue.goodsSizeSkuId,
|
|
|
num: _.toInteger(subValue.goodsSizeStorageNum),
|
|
|
goodsId: subValue.goodsId
|
|
|
sku: subValue.productSku,
|
|
|
num: _.toInteger(subValue.storageNumber),
|
|
|
goodsId: value.goodsId
|
|
|
};
|
|
|
|
|
|
// 虚拟商品,增加为一件
|
|
|
if (subValue.attribute === 3) {
|
|
|
if (base.attribute === 3) {
|
|
|
size.num = size.num > 1 ? 1 : 0;
|
|
|
}
|
|
|
|
...
|
...
|
|