Authored by 郭成尧

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

@@ -30,7 +30,6 @@ const nl2r = (data) => { @@ -30,7 +30,6 @@ const nl2r = (data) => {
30 url: value.url 30 url: value.url
31 }); 31 });
32 }); 32 });
33 - console.log(result);  
34 return result; 33 return result;
35 }; 34 };
36 35
@@ -52,49 +51,8 @@ const hotCategory = (data) => { @@ -52,49 +51,8 @@ const hotCategory = (data) => {
52 /** 51 /**
53 * 分类导航 52 * 分类导航
54 */ 53 */
55 -const categoryNavigation = (data) => {  
56 - const goodsMenu = {  
57 - title: '最新折扣',  
58 - menuList: [],  
59 - more: 'http://list.yohobuy.com/?msort=3&misort=26'  
60 - };  
61 -  
62 - _.forEach(data, (value) => {  
63 - goodsMenu.menuList.push({  
64 - cur: false,  
65 - url: value.url,  
66 - name: value.categoryName  
67 - });  
68 - });  
69 - return {  
70 - goodsBoard: {  
71 - oodsMenu: goodsMenu,  
72 - sort: {  
73 - sortType: [{  
74 - name: '最新',  
75 - active: true,  
76 - hasSortOrient: {  
77 - active: true,  
78 - desc: true  
79 - }  
80 - }, {  
81 - name: '折扣',  
82 - active: false,  
83 - hasSortOrient: {  
84 - active: false,  
85 - desc: true  
86 - }  
87 - }, {  
88 - name: '价格',  
89 - active: false,  
90 - hasSortOrient: {  
91 - active: true,  
92 - desc: true  
93 - }  
94 - }]  
95 - }  
96 - }  
97 - }; 54 +const categoryNavigation = (data, params) => {
  55 + return params;
98 }; 56 };
99 57
100 /** 58 /**
@@ -151,7 +109,7 @@ const handleOutletsGoodsMenuData = (origin, params) => { @@ -151,7 +109,7 @@ const handleOutletsGoodsMenuData = (origin, params) => {
151 * @param {[array]} list 109 * @param {[array]} list
152 * @return {[array]} 110 * @return {[array]}
153 */ 111 */
154 -exports.processFloor = (list) => { 112 +exports.processFloor = (list, params) => {
155 const formatData = []; 113 const formatData = [];
156 let floorData; 114 let floorData;
157 115
@@ -168,7 +126,7 @@ exports.processFloor = (list) => { @@ -168,7 +126,7 @@ exports.processFloor = (list) => {
168 floorData = hotCategory(floor.data); 126 floorData = hotCategory(floor.data);
169 break; 127 break;
170 case 'categoryNavigation': 128 case 'categoryNavigation':
171 - floorData = categoryNavigation(floor.data); 129 + floorData = categoryNavigation(floor.data, params);
172 break; 130 break;
173 default: 131 default:
174 floorData = floor.data; 132 floorData = floor.data;