Authored by 周少峰

channel data

... ... @@ -40,7 +40,7 @@ exports.channel = (req, res, next) => {
module: 'product',
page: 'outlets'
};
let channel = req.query.channel || req.cookies._Channel || 'boys';
let channel = req.params.channel || req.query.channel || req.cookies._Channel || 'boys';
outlets.getOutletsChannelData(req.query, channel).then(result => {
res.render('outlets/channel', Object.assign(resData, result));
... ...
... ... @@ -89,13 +89,14 @@ exports.getOutletsTrendData = (params) => {
* @return {[type]} [description]
*/
exports.getOutletsGoodsList = (params) => {
console.log(params.channel);
// 频道
let tempChannel = params.channel || 'boys';
// 接口可接收的参数
let apiParams = ['outlets', 'page', 'limit', 'order', 'productSize', 'yh_channel', 'query',
'p_d', 'gender', 'msort', 'misort', 'sort', 'brand', 'color', 'size', 'saleType',
'breakSize', 'breakSort', 'productPool', 'price'];
'breakSize', 'breakSort', 'productPool', 'price', 'method'];
// 初始化必填的接口参数
let tempParams = {
... ... @@ -113,5 +114,6 @@ exports.getOutletsGoodsList = (params) => {
tempParams[paramsName] = params[paramsName];
}
});
console.log(tempParams);
return api.get('', sign.apiSign(tempParams));
};
... ...
... ... @@ -138,7 +138,7 @@ exports.getOutletsChannelData = (params, channel) => {
}),
// 获取奥莱商品列表
outletsApi.getOutletsGoodsList(Object.assign(params, {channel: channel}))
outletsApi.getOutletsGoodsList(Object.assign(params, {channel: channel, method: 'app.search.category'}))
];
return api.all(apiArr).then(result => {
... ...