...
|
...
|
@@ -47,6 +47,37 @@ const processSpecial = (list) => { |
|
|
return formatData;
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 商品搜索数据处理
|
|
|
*/
|
|
|
const processSearch = (list) => {
|
|
|
// const formartData = [];
|
|
|
|
|
|
// let goods = {};
|
|
|
|
|
|
list = list || [];
|
|
|
|
|
|
// _.forEach(camelCase(list.data.product_list), (data) => {
|
|
|
|
|
|
// });
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取商品数据
|
|
|
*/
|
|
|
exports.getSearchData = (params) => {
|
|
|
return api.get('', sign.apiSign(Object.assign({
|
|
|
method: 'app.search.sales'
|
|
|
}, params))).then((result) => {
|
|
|
if (result && result.code === 200) {
|
|
|
return processSearch(result);
|
|
|
} else {
|
|
|
logger.error('SALE 商品搜索返回 code 不是 200');
|
|
|
return [];
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
exports.getSaleResources = () => {
|
|
|
return serviceAPI.get('operations/api/v5/resource/get', sign.apiSign({
|
|
|
content_code: '7c2b77093421efa8ae9302c91460db73'
|
...
|
...
|
@@ -61,18 +92,6 @@ exports.getSaleResources = () => { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取首页数据
|
|
|
* @param {[object]} params
|
|
|
* @return {[object]}
|
|
|
*/
|
|
|
exports.getSaleData = (params) => {
|
|
|
|
|
|
return api.get('', sign.apiSign(Object.assign({
|
|
|
method: 'app.search.sales'
|
|
|
}, params)));
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取折扣专场专题列表数据
|
|
|
* @param {[object]} params
|
|
|
* @return {[object]}
|
...
|
...
|
|