...
|
...
|
@@ -11,6 +11,7 @@ const utils = '../../../utils'; |
|
|
const API = require(`${library}/api`).API;
|
|
|
const api = new API();
|
|
|
const saleApi = require('./sale-api');
|
|
|
const outletsApi = require('./outlets-api');
|
|
|
const productProcess = require(`${utils}/product-process`);
|
|
|
const publicHandler = require('./public-handler');
|
|
|
|
...
|
...
|
@@ -20,12 +21,23 @@ const publicHandler = require('./public-handler'); |
|
|
* @param {[type]} extra [左侧列表额外要拼接的参数]
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.getSaleOthersData = (params, channel) => {
|
|
|
return api.all([
|
|
|
// headerModel.requestHeaderData(channel),
|
|
|
saleApi.getSaleGoodsList(Object.assign(params, { channel: channel })),
|
|
|
saleApi.getSaleGoodsList({limit: '1', channel: channel })
|
|
|
]).then(result => {
|
|
|
exports.getListData = (params, channel) => {
|
|
|
let apiArr = [];
|
|
|
|
|
|
if (params.productPool) {
|
|
|
// 奥莱活动页调用app.search.sales
|
|
|
apiArr = [
|
|
|
saleApi.getSaleGoodsList({limit: '1', channel: channel }),
|
|
|
saleApi.getSaleGoodsList(Object.assign(params, { channel: channel }))
|
|
|
];
|
|
|
} else {
|
|
|
// 奥莱品类页调用app.search.li
|
|
|
apiArr = [
|
|
|
outletsApi.getOutletsGoodsList({limit: '1', channel: channel }),
|
|
|
outletsApi.getOutletsGoodsList(Object.assign(params, { channel: channel }))
|
|
|
];
|
|
|
}
|
|
|
return api.all(apiArr).then(result => {
|
|
|
let finalResult = {};
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
...
|
...
|
|