Authored by 周少峰

channel data

@@ -40,7 +40,7 @@ exports.channel = (req, res, next) => { @@ -40,7 +40,7 @@ exports.channel = (req, res, next) => {
40 module: 'product', 40 module: 'product',
41 page: 'outlets' 41 page: 'outlets'
42 }; 42 };
43 - let channel = req.query.channel || req.cookies._Channel || 'boys'; 43 + let channel = req.params.channel || req.query.channel || req.cookies._Channel || 'boys';
44 44
45 outlets.getOutletsChannelData(req.query, channel).then(result => { 45 outlets.getOutletsChannelData(req.query, channel).then(result => {
46 res.render('outlets/channel', Object.assign(resData, result)); 46 res.render('outlets/channel', Object.assign(resData, result));
@@ -89,13 +89,14 @@ exports.getOutletsTrendData = (params) => { @@ -89,13 +89,14 @@ exports.getOutletsTrendData = (params) => {
89 * @return {[type]} [description] 89 * @return {[type]} [description]
90 */ 90 */
91 exports.getOutletsGoodsList = (params) => { 91 exports.getOutletsGoodsList = (params) => {
  92 + console.log(params.channel);
92 // 频道 93 // 频道
93 let tempChannel = params.channel || 'boys'; 94 let tempChannel = params.channel || 'boys';
94 95
95 // 接口可接收的参数 96 // 接口可接收的参数
96 let apiParams = ['outlets', 'page', 'limit', 'order', 'productSize', 'yh_channel', 'query', 97 let apiParams = ['outlets', 'page', 'limit', 'order', 'productSize', 'yh_channel', 'query',
97 'p_d', 'gender', 'msort', 'misort', 'sort', 'brand', 'color', 'size', 'saleType', 98 'p_d', 'gender', 'msort', 'misort', 'sort', 'brand', 'color', 'size', 'saleType',
98 - 'breakSize', 'breakSort', 'productPool', 'price']; 99 + 'breakSize', 'breakSort', 'productPool', 'price', 'method'];
99 100
100 // 初始化必填的接口参数 101 // 初始化必填的接口参数
101 let tempParams = { 102 let tempParams = {
@@ -113,5 +114,6 @@ exports.getOutletsGoodsList = (params) => { @@ -113,5 +114,6 @@ exports.getOutletsGoodsList = (params) => {
113 tempParams[paramsName] = params[paramsName]; 114 tempParams[paramsName] = params[paramsName];
114 } 115 }
115 }); 116 });
  117 + console.log(tempParams);
116 return api.get('', sign.apiSign(tempParams)); 118 return api.get('', sign.apiSign(tempParams));
117 }; 119 };
@@ -138,7 +138,7 @@ exports.getOutletsChannelData = (params, channel) => { @@ -138,7 +138,7 @@ exports.getOutletsChannelData = (params, channel) => {
138 }), 138 }),
139 139
140 // 获取奥莱商品列表 140 // 获取奥莱商品列表
141 - outletsApi.getOutletsGoodsList(Object.assign(params, {channel: channel})) 141 + outletsApi.getOutletsGoodsList(Object.assign(params, {channel: channel, method: 'app.search.category'}))
142 ]; 142 ];
143 143
144 return api.all(apiArr).then(result => { 144 return api.all(apiArr).then(result => {