Authored by 郭成尧

添加获取首页潮品速递的接口

/*
* @Author: Targaryen
* @Date: 2016-06-01 14:37:03
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-02 10:09:02
*/
* @Author: Targaryen
* @Date: 2016-06-01 14:37:03
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-02 11:51:34
*/
'use strict';
const library = '../../../library';
... ... @@ -43,4 +43,19 @@ exports.getChannelResouceData = (params) => {
return serviceApi.get('operations/api/v5/resource/home', sign.apiSign(params));
};
/**
* 获取奥莱潮品速递商品数据
* @param {[type]} params [description]
* @return {[type]} [description]
*/
exports.getOutletsTrendData = (params) => {
return api.get('', sign.apiSign({
method: 'app.search.trend',
yh_channel: params.yh_channel || '1',
order: params.order || 's_s_desc,s_n_desc',
gender: params.gender || '1,3',
stocknumber: 1, // 过滤出库存 > 1的商品
limit: params.limit || 10,
outlets: params.outlets || 1 // 默认取奥莱商品
}));
};
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2016-05-30 16:20:03
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-02 11:08:56
* @Last Modified time: 2016-06-02 11:45:28
*/
'use strict';
... ... @@ -15,6 +15,15 @@ const outletsProcess = require('./outlets-handler');
const outletsApi = require('./outlets-api');
const productProcess = require(`${utils}/product-process`);
// 奥莱频道资源码
const channelCode = {
index: 'e0565dad65fb8da1f39bc1ac83fc8346',
boys: '2af513637dc5feeec7f6f8b52989b24b',
girls: 'd1b56b56c3a12dc1f2f83958680a0911',
kids: '0fd7ad594940f9ec5a03697317cf6521',
lifestyle: 'b3d3f55a26f130ac2b516b9fb3823711'
};
/**
* 获取奥莱首页数据
* @param {[type]} origin [description]
... ... @@ -22,7 +31,7 @@ const productProcess = require(`${utils}/product-process`);
*/
exports.getOutletsIndexData = (params) => {
return api.all([
outletsApi.getChannelResouceData({ content_code: 'e0565dad65fb8da1f39bc1ac83fc8346' }),
outletsApi.getChannelResouceData({ content_code: channelCode.index }),
outletsApi.getOutletsActivityOrigin(params), // 获取限时活动列表
outletsApi.getOutletsActivityOrigin(params) // 获取即将结束列表
]).then(result => {
... ... @@ -49,15 +58,6 @@ exports.getOutletsIndexData = (params) => {
});
};
// 奥莱频道资源码
const channelCode = {
boys: '2af513637dc5feeec7f6f8b52989b24b',
girls: 'd1b56b56c3a12dc1f2f83958680a0911',
kids: '0fd7ad594940f9ec5a03697317cf6521',
lifestyle: 'b3d3f55a26f130ac2b516b9fb3823711'
};
/**
* 获取奥莱频道页面数据
* @param {[object]} gender
... ...