...
|
...
|
@@ -72,7 +72,9 @@ const processBreakingSort = (list) => { |
|
|
/**
|
|
|
* 商品搜索数据处理
|
|
|
*/
|
|
|
const processSearch = () => {
|
|
|
const processSearch = (data) => {
|
|
|
return camelCase(data);
|
|
|
|
|
|
// const goods = [];
|
|
|
|
|
|
// list = list || [];
|
...
|
...
|
@@ -112,22 +114,6 @@ const processSearch = () => { |
|
|
// });
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取商品数据
|
|
|
*/
|
|
|
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 [];
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const getResources = (page) => {
|
|
|
const contentCode = {
|
|
|
sale: '7c2b77093421efa8ae9302c91460db73',
|
...
|
...
|
@@ -161,6 +147,23 @@ const getBreakingSort = (yhChannel) => { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取商品数据
|
|
|
*/
|
|
|
exports.getSearchData = (params) => {
|
|
|
params = params || {};
|
|
|
return api.get('', sign.apiSign(Object.assign({
|
|
|
method: 'app.search.sales'
|
|
|
}, params))).then((result) => {
|
|
|
if (result && result.code === 200) {
|
|
|
return processSearch(result.data);
|
|
|
} else {
|
|
|
logger.error('SALE 商品搜索返回 code 不是 200');
|
|
|
return {};
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取sale首页数据
|
|
|
* @param {[object]} params
|
|
|
* @return {[object]}
|
...
|
...
|
@@ -199,10 +202,10 @@ exports.getSpecialData = (params) => { |
|
|
}, params))).then((result) => {
|
|
|
if (result && result.code === 200) {
|
|
|
specialData.data = processSpecial(result.data);
|
|
|
return specialData;
|
|
|
} else {
|
|
|
return Promise.reject('error');
|
|
|
logger.error('SALE 专题活动列表接口返回 code 不是 200');
|
|
|
}
|
|
|
return specialData;
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
|