Authored by yyq

Merge branch 'release/4.6' of git.yoho.cn:fe/yohobuy-node into release/4.6

@@ -284,3 +284,23 @@ exports.handleOutletstrendGoodData = (origin) => { @@ -284,3 +284,23 @@ exports.handleOutletstrendGoodData = (origin) => {
284 284
285 return dest; 285 return dest;
286 }; 286 };
  287 +
  288 +/**
  289 + * 处理即将上线品牌数据
  290 + * @param origin
  291 + * @returns {{}}
  292 + */
  293 +exports.handleComeSoonData = (origin) => {
  294 + let dest = {
  295 + title: '上线预告'
  296 + };
  297 +
  298 + dest.brands = [];
  299 + _.forEach(origin, value => {
  300 + dest.brands.push({
  301 + logo: value.logoUrl
  302 + });
  303 + });
  304 +
  305 + return dest;
  306 +};
@@ -41,8 +41,8 @@ exports.getOutletsIndexData = (params, channel) => { @@ -41,8 +41,8 @@ exports.getOutletsIndexData = (params, channel) => {
41 outletsApi.getOutletsActivityOrigin({type: '1', channel: channel}), // 获取限时活动列表 41 outletsApi.getOutletsActivityOrigin({type: '1', channel: channel}), // 获取限时活动列表
42 outletsApi.getOutletsActivityOrigin({type: '2', channel: channel}), // 获取即将结束列表 42 outletsApi.getOutletsActivityOrigin({type: '2', channel: channel}), // 获取即将结束列表
43 outletsApi.getOutletsTrendData({limit: '30'}), // 获取潮流速递商品数据 43 outletsApi.getOutletsTrendData({limit: '30'}), // 获取潮流速递商品数据
44 - outletsApi.getOutletsGoodsList({limit: params.limit || '100'}) // 获取底部商品数据  
45 - 44 + outletsApi.getOutletsGoodsList({limit: params.limit || '100'}), // 获取底部商品数据
  45 + outletsApi.getOutletsActivityOrigin({type: '3', channel: channel}) // tar add 16171552 即将上线数据
46 ]).then(result => { 46 ]).then(result => {
47 let finalResult = {}; 47 let finalResult = {};
48 48
@@ -83,6 +83,11 @@ exports.getOutletsIndexData = (params, channel) => { @@ -83,6 +83,11 @@ exports.getOutletsIndexData = (params, channel) => {
83 finalResult.pager = publicHandler.handleSalePagerData(result[5].data.total, params); 83 finalResult.pager = publicHandler.handleSalePagerData(result[5].data.total, params);
84 } 84 }
85 85
  86 + // 处理即将上架品牌数据
  87 + if (result[6].code === 200) {
  88 + finalResult.limitedBuy.extra.comeSoon = outletsProcess.handleComeSoonData(result[6].data);
  89 + }
  90 +
86 return finalResult; 91 return finalResult;
87 }); 92 });
88 }; 93 };
@@ -28,7 +28,7 @@ const handleGoodsListData = (origin) => { @@ -28,7 +28,7 @@ const handleGoodsListData = (origin) => {
28 _.forEach(origin, (value, key) => { 28 _.forEach(origin, (value, key) => {
29 if (!_.isEmpty(value.goodsList)) { 29 if (!_.isEmpty(value.goodsList)) {
30 _.forEach(value.goodsList, (subValue, subKey) => { 30 _.forEach(value.goodsList, (subValue, subKey) => {
31 - origin[key].goodsList[subKey].href = 31 + origin[key].goodsList[subKey].url =
32 helpers.urlFormat(`/product/pro_${value.productId}_${subValue.goodsId}/${value.cnAlphabet}.html`); 32 helpers.urlFormat(`/product/pro_${value.productId}_${subValue.goodsId}/${value.cnAlphabet}.html`);
33 }); 33 });
34 } 34 }