Authored by 王水玲

添加默认值

@@ -131,7 +131,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys @@ -131,7 +131,7 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
131 imgCover: it.goods_images ? helpers.image(it.goods_images, 64, 88) : '', 131 imgCover: it.goods_images ? helpers.image(it.goods_images, 64, 88) : '',
132 productColor: it.factory_goods_name, 132 productColor: it.factory_goods_name,
133 productSize: it.size_name, 133 productSize: it.size_name,
134 - skuTitle: it.sku_title, 134 + skuTitle: it.sku_title || '尺码',
135 productPrice: transPrice(it.sales_price), 135 productPrice: transPrice(it.sales_price),
136 productNum: Number(it.buy_number), 136 productNum: Number(it.buy_number),
137 storageNum: Number(it.storage_number), 137 storageNum: Number(it.storage_number),
@@ -346,7 +346,7 @@ module.exports = class extends global.yoho.BaseModel { @@ -346,7 +346,7 @@ module.exports = class extends global.yoho.BaseModel {
346 346
347 result.isCollect = propOrigin('is_collect'); 347 result.isCollect = propOrigin('is_collect');
348 result.colors = skuData.skuGoods; 348 result.colors = skuData.skuGoods;
349 - result.skuTitle = propOrigin('skuTitle'); 349 + result.skuTitle = propOrigin('skuTitle') || '尺码';
350 350
351 return result; 351 return result;
352 } 352 }
@@ -423,7 +423,7 @@ module.exports = class extends global.yoho.BaseModel { @@ -423,7 +423,7 @@ module.exports = class extends global.yoho.BaseModel {
423 newGood.name = good.product_name; 423 newGood.name = good.product_name;
424 newGood.color = good.factory_color_name; 424 newGood.color = good.factory_color_name;
425 newGood.size = good.size_name; 425 newGood.size = good.size_name;
426 - newGood.skuTitle = good.sku_title; 426 + newGood.skuTitle = good.sku_title || '尺码';
427 newGood.price = that.transPrice(good.sales_price);// 默认显示销售价 427 newGood.price = that.transPrice(good.sales_price);// 默认显示销售价
428 newGood.isVipPrice = good.discount_tag === 'V'; 428 newGood.isVipPrice = good.discount_tag === 'V';
429 newGood.isStuPrice = good.discount_tag === 'S'; 429 newGood.isStuPrice = good.discount_tag === 'S';
@@ -860,7 +860,7 @@ module.exports = class extends global.yoho.BaseModel { @@ -860,7 +860,7 @@ module.exports = class extends global.yoho.BaseModel {
860 name: good.product_name, 860 name: good.product_name,
861 color: good.factory_color_name, 861 color: good.factory_color_name,
862 size: good.size_name, 862 size: good.size_name,
863 - skuTitle: good.sku_title, 863 + skuTitle: good.sku_title || '尺码',
864 price: that.transPrice(good.sales_price), // 默认显示销售价 864 price: that.transPrice(good.sales_price), // 默认显示销售价
865 isVipPrice: good.discount_tag === 'V', 865 isVipPrice: good.discount_tag === 'V',
866 isStuPrice: good.discount_tag === 'S', 866 isStuPrice: good.discount_tag === 'S',
@@ -360,7 +360,7 @@ function parseProductInfo(productInfo, defaultInfo) { @@ -360,7 +360,7 @@ function parseProductInfo(productInfo, defaultInfo) {
360 defaultColor: defaultColor, 360 defaultColor: defaultColor,
361 defaultSize: defaultSize, 361 defaultSize: defaultSize,
362 defaultImg: defaultImg, 362 defaultImg: defaultImg,
363 - skuTitle: productInfo.skuTitle 363 + skuTitle: productInfo.skuTitle || '尺码'
364 }; 364 };
365 } 365 }
366 366