...
|
...
|
@@ -85,17 +85,29 @@ exports.getOutletsTrendData = (params) => { |
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.getOutletsGoodsList = (params) => {
|
|
|
// 频道
|
|
|
let tempChannel = params.channel || 'boys';
|
|
|
|
|
|
let tempChannel = _.isEmpty(params.channel) ? 'boys' : params.channel;
|
|
|
// 接口可接收的参数
|
|
|
let apiParams = ['outlets', 'page', 'limit', 'order', 'productSize', 'yh_channel', 'query',
|
|
|
'p_d', 'gender', 'msort', 'misort', 'sort', 'brand', 'color', 'size', 'saleType',
|
|
|
'breakSize', 'breakSort', 'productPool', 'price'];
|
|
|
|
|
|
params = Object.assign({
|
|
|
// 初始化必填的接口参数
|
|
|
let tempParams = {
|
|
|
method: 'app.search.li',
|
|
|
outlets: 1,
|
|
|
limit: 60,
|
|
|
order: 's_t_desc',
|
|
|
page: params.page || 1,
|
|
|
limit: params.limit || 60,
|
|
|
order: params.order || 's_t_desc',
|
|
|
productSize: '384x511',
|
|
|
yh_channel: yhChannel[tempChannel].channel
|
|
|
}, params);
|
|
|
params.yh_channel = yhChannel[tempChannel].channel;
|
|
|
return api.get('', sign.apiSign(params));
|
|
|
};
|
|
|
|
|
|
_.forEach(apiParams, (paramsName) => {
|
|
|
if (params[paramsName]) {
|
|
|
tempParams[paramsName] = params[paramsName];
|
|
|
}
|
|
|
});
|
|
|
return api.get('', sign.apiSign(tempParams));
|
|
|
}; |
...
|
...
|
|