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) => {
return dest;
};
/**
* 处理即将上线品牌数据
* @param origin
* @returns {{}}
*/
exports.handleComeSoonData = (origin) => {
let dest = {
title: '上线预告'
};
dest.brands = [];
_.forEach(origin, value => {
dest.brands.push({
logo: value.logoUrl
});
});
return dest;
};
... ...
... ... @@ -41,8 +41,8 @@ exports.getOutletsIndexData = (params, channel) => {
outletsApi.getOutletsActivityOrigin({type: '1', channel: channel}), // 获取限时活动列表
outletsApi.getOutletsActivityOrigin({type: '2', channel: channel}), // 获取即将结束列表
outletsApi.getOutletsTrendData({limit: '30'}), // 获取潮流速递商品数据
outletsApi.getOutletsGoodsList({limit: params.limit || '100'}) // 获取底部商品数据
outletsApi.getOutletsGoodsList({limit: params.limit || '100'}), // 获取底部商品数据
outletsApi.getOutletsActivityOrigin({type: '3', channel: channel}) // tar add 16171552 即将上线数据
]).then(result => {
let finalResult = {};
... ... @@ -83,6 +83,11 @@ exports.getOutletsIndexData = (params, channel) => {
finalResult.pager = publicHandler.handleSalePagerData(result[5].data.total, params);
}
// 处理即将上架品牌数据
if (result[6].code === 200) {
finalResult.limitedBuy.extra.comeSoon = outletsProcess.handleComeSoonData(result[6].data);
}
return finalResult;
});
};
... ...
... ... @@ -28,7 +28,7 @@ const handleGoodsListData = (origin) => {
_.forEach(origin, (value, key) => {
if (!_.isEmpty(value.goodsList)) {
_.forEach(value.goodsList, (subValue, subKey) => {
origin[key].goodsList[subKey].href =
origin[key].goodsList[subKey].url =
helpers.urlFormat(`/product/pro_${value.productId}_${subValue.goodsId}/${value.cnAlphabet}.html`);
});
}
... ...