Authored by 王水玲

添加默认值

... ... @@ -131,7 +131,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
imgCover: it.goods_images ? helpers.image(it.goods_images, 64, 88) : '',
productColor: it.factory_goods_name,
productSize: it.size_name,
skuTitle: it.sku_title,
skuTitle: it.sku_title || '尺码',
productPrice: transPrice(it.sales_price),
productNum: Number(it.buy_number),
storageNum: Number(it.storage_number),
... ...
... ... @@ -346,7 +346,7 @@ module.exports = class extends global.yoho.BaseModel {
result.isCollect = propOrigin('is_collect');
result.colors = skuData.skuGoods;
result.skuTitle = propOrigin('skuTitle');
result.skuTitle = propOrigin('skuTitle') || '尺码';
return result;
}
... ...
... ... @@ -423,7 +423,7 @@ module.exports = class extends global.yoho.BaseModel {
newGood.name = good.product_name;
newGood.color = good.factory_color_name;
newGood.size = good.size_name;
newGood.skuTitle = good.sku_title;
newGood.skuTitle = good.sku_title || '尺码';
newGood.price = that.transPrice(good.sales_price);// 默认显示销售价
newGood.isVipPrice = good.discount_tag === 'V';
newGood.isStuPrice = good.discount_tag === 'S';
... ... @@ -860,7 +860,7 @@ module.exports = class extends global.yoho.BaseModel {
name: good.product_name,
color: good.factory_color_name,
size: good.size_name,
skuTitle: good.sku_title,
skuTitle: good.sku_title || '尺码',
price: that.transPrice(good.sales_price), // 默认显示销售价
isVipPrice: good.discount_tag === 'V',
isStuPrice: good.discount_tag === 'S',
... ...
... ... @@ -360,7 +360,7 @@ function parseProductInfo(productInfo, defaultInfo) {
defaultColor: defaultColor,
defaultSize: defaultSize,
defaultImg: defaultImg,
skuTitle: productInfo.skuTitle
skuTitle: productInfo.skuTitle || '尺码'
};
}
... ...