Authored by 毕凯

Merge remote-tracking branch 'origin/hotfix/online' into gray

... ... @@ -15,13 +15,13 @@ let fCbFn, hCbFn; // 筛选和关闭的回调
// 隐藏筛选界面
function hideFilter() {
setTimeout(function() {
$filter.addClass('hide');
$filter && $filter.addClass('hide');
}, 301);
}
// 显示筛选界面
function showFilter() {
$filter.removeClass('hide');
$filter && $filter.removeClass('hide');
}
// 一级菜单点击时背景高亮
... ...
... ... @@ -313,8 +313,7 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
finalDetail.push({
relatedReco: {
isApp: isApp,
goods: goodsData,
moreNum: goodsData.length - 2 > 0 ? goodsData.length - 2 : 0
goods: goodsData
}
});
}
... ... @@ -380,14 +379,26 @@ const pushGoodsInfo = (finalDetail, goodsList, isApp) => {
_.forEach(finalDetail, (value, key) => {
if (value.relatedReco) {
_.forEach(value.relatedReco.goods, (item, subKey) => {
if (goodsObj[item.id]) {
finalDetail[key].relatedReco.goods[subKey] = goodsObj[item.id];
let goodsIds = [];
_.forEach(value.relatedReco.goods, relatedGoods => {
goodsIds.push(relatedGoods.id);
});
goodsIds = _.uniq(goodsIds);
finalDetail[key].relatedReco.goods = [];
_.forEach(goodsIds, (item, subKey) => {
if (goodsObj[item]) {
finalDetail[key].relatedReco.goods[subKey] = goodsObj[item];
} else {
delete finalDetail[key].relatedReco.goods[subKey];
finalDetail[key].relatedReco.moreNum--;
}
});
let moreNum = _.get(finalDetail[key], 'relatedReco.goods.length', 0);
finalDetail[key].relatedReco.moreNum = moreNum - 2 > 0 ? moreNum - 2 : 0;
}
if (value.collocation) {
... ...