Authored by 刘传洋

m

@@ -43,6 +43,17 @@ const transPrice = (price) => { @@ -43,6 +43,17 @@ const transPrice = (price) => {
43 return price ? (price * 1).toFixed(2) : '0.00'; 43 return price ? (price * 1).toFixed(2) : '0.00';
44 }; 44 };
45 45
  46 +const priceIconReplace = (title) => {
  47 +
  48 + let ret = title;
  49 +
  50 + if (ret) {
  51 + ret = ret.replace(/¥/g, '¥');
  52 + }
  53 +
  54 + return ret;
  55 +};
  56 +
46 /** 57 /**
47 * 生成公开的TOKEN凭证 58 * 生成公开的TOKEN凭证
48 * 59 *
@@ -259,7 +270,7 @@ const formatPromotionInfos = (infoList) => { @@ -259,7 +270,7 @@ const formatPromotionInfos = (infoList) => {
259 return { 270 return {
260 cutdownAmount: it.cutdown_amount, 271 cutdownAmount: it.cutdown_amount,
261 promotionId: it.promotion_id, 272 promotionId: it.promotion_id,
262 - promotionTitle: it.promotion_title, 273 + promotionTitle: priceIconReplace(it.promotion_title),
263 promotionType: it.promotion_type, 274 promotionType: it.promotion_type,
264 tag: PROMOTION_TYPE_TAG_MAP[it.promotion_type] 275 tag: PROMOTION_TYPE_TAG_MAP[it.promotion_type]
265 }; 276 };
@@ -291,7 +302,7 @@ const formatPriceGiftOne = (it) => { @@ -291,7 +302,7 @@ const formatPriceGiftOne = (it) => {
291 // isShowGift: isGift, // 控制是否显示赠品 302 // isShowGift: isGift, // 控制是否显示赠品
292 // isFold: true, // 控制是否[展开] 303 // isFold: true, // 控制是否[展开]
293 promotionId: it.promotion_id, 304 promotionId: it.promotion_id,
294 - promotionTitle: it.promotion_title.replace('¥', '¥'), // + '(注:您看到的商品可能因为下单时间差已售完)', // subjoinType 305 + promotionTitle: priceIconReplace(it.promotion_title), // + '(注:您看到的商品可能因为下单时间差已售完)', // subjoinType
295 maxSelectNumber: it.max_select_number, 306 maxSelectNumber: it.max_select_number,
296 promotionType: it.promotion_type, 307 promotionType: it.promotion_type,
297 tag: PROMOTION_TYPE_TAG_MAP[it.promotion_type], 308 tag: PROMOTION_TYPE_TAG_MAP[it.promotion_type],
@@ -380,7 +391,7 @@ const formatPromotion = (it, selectedGiftsList) => { @@ -380,7 +391,7 @@ const formatPromotion = (it, selectedGiftsList) => {
380 giftPrice: it.gift_price, // 赠品或加价购商品价格 391 giftPrice: it.gift_price, // 赠品或加价购商品价格
381 giftGoodsList: formatCartGoods(it.gift_goods_List), // 可供选择的赠品或加价购商品列表 392 giftGoodsList: formatCartGoods(it.gift_goods_List), // 可供选择的赠品或加价购商品列表
382 promotionId: it.promotion_id, // 促销id 393 promotionId: it.promotion_id, // 促销id
383 - promotionTitle: it.promotion_title, // "已满足[满30减10-dev30]", 394 + promotionTitle: priceIconReplace(it.promotion_title), // "已满足[满30减10-dev30]",
384 promotionType: it.promotion_type, // 促销类型 395 promotionType: it.promotion_type, // 促销类型
385 // list.yohobuy.com?psp_id=10408 396 // list.yohobuy.com?psp_id=10408
386 promotionPageUrl: helpers.urlFormat('', { psp_id: it.promotion_id }, 'list'), 397 promotionPageUrl: helpers.urlFormat('', { psp_id: it.promotion_id }, 'list'),
@@ -759,7 +759,8 @@ const getRecommendProduct = (channel, uid, udid, page) => { @@ -759,7 +759,8 @@ const getRecommendProduct = (channel, uid, udid, page) => {
759 title: it.product_name, 759 title: it.product_name,
760 img: it.default_images ? helpers.image(it.default_images, 190, 250) : '', 760 img: it.default_images ? helpers.image(it.default_images, 190, 250) : '',
761 alt: it.product_name, 761 alt: it.product_name,
762 - price: chelper.transPrice(it.sales_price) 762 + price: '¥' + chelper.transPrice(it.sales_price),
  763 + marketPrice: it.market_price ? '¥' + chelper.transPrice(it.market_price) : ''
763 }; 764 };
764 765
765 // 商品链接 766 // 商品链接