Authored by 郭成尧

Merge branch 'feature/sale' of git.yoho.cn:fe/yohobuy-node into feature/sale

... ... @@ -30,7 +30,6 @@ const nl2r = (data) => {
url: value.url
});
});
console.log(result);
return result;
};
... ... @@ -52,49 +51,8 @@ const hotCategory = (data) => {
/**
* 分类导航
*/
const categoryNavigation = (data) => {
const goodsMenu = {
title: '最新折扣',
menuList: [],
more: 'http://list.yohobuy.com/?msort=3&misort=26'
};
_.forEach(data, (value) => {
goodsMenu.menuList.push({
cur: false,
url: value.url,
name: value.categoryName
});
});
return {
goodsBoard: {
oodsMenu: goodsMenu,
sort: {
sortType: [{
name: '最新',
active: true,
hasSortOrient: {
active: true,
desc: true
}
}, {
name: '折扣',
active: false,
hasSortOrient: {
active: false,
desc: true
}
}, {
name: '价格',
active: false,
hasSortOrient: {
active: true,
desc: true
}
}]
}
}
};
const categoryNavigation = (data, params) => {
return params;
};
/**
... ... @@ -151,7 +109,7 @@ const handleOutletsGoodsMenuData = (origin, params) => {
* @param {[array]} list
* @return {[array]}
*/
exports.processFloor = (list) => {
exports.processFloor = (list, params) => {
const formatData = [];
let floorData;
... ... @@ -168,7 +126,7 @@ exports.processFloor = (list) => {
floorData = hotCategory(floor.data);
break;
case 'categoryNavigation':
floorData = categoryNavigation(floor.data);
floorData = categoryNavigation(floor.data, params);
break;
default:
floorData = floor.data;
... ...