...
|
...
|
@@ -81,16 +81,20 @@ exports.getListData = (params, channel) => { |
|
|
|
|
|
// 获取左侧类目数据
|
|
|
if (result[1].code === 200) {
|
|
|
let dps = {};
|
|
|
|
|
|
if (params.gender) {
|
|
|
dps.gender = params.gender;
|
|
|
}
|
|
|
finalResult.list = Object.assign(
|
|
|
searchHandler.handlePathNavData(result[1].data.sort, params, 'sort', channel), {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, dps)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
|
|
if (result[2].code === 200) {
|
|
|
Object.assign(finalResult.list, {
|
|
|
// filters: searchHandler.handleFilterData(result[2].data.filter, params),
|
|
|
filters: searchHandler.handleFilterDataAll(result[2].data, params),
|
|
|
opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter),
|
|
|
totalCount: result[2].data.total,
|
...
|
...
|
@@ -148,19 +152,23 @@ exports.getListNewData = (params, channel) => { |
|
|
leftContent: {}
|
|
|
}
|
|
|
};
|
|
|
let dps = {};
|
|
|
|
|
|
if (params.gender) {
|
|
|
dps.gender = params.gender;
|
|
|
}
|
|
|
|
|
|
// 获取左侧类目数据
|
|
|
if (result[1].code === 200) {
|
|
|
finalResult.list = Object.assign(
|
|
|
searchHandler.handlePathNavData(result[1].data.sort, params, 'new', channel), {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, dps)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
|
|
if (result[2].code === 200) {
|
|
|
Object.assign(finalResult.list, {
|
|
|
// filters: searchHandler.handleFilterData(result[2].data.filter, params),
|
|
|
filters: searchHandler.handleFilterDataAll(result[2].data, params),
|
|
|
opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter),
|
|
|
totalCount: result[2].data.total,
|
...
|
...
|
@@ -176,7 +184,7 @@ exports.getListNewData = (params, channel) => { |
|
|
|
|
|
// 新品上架
|
|
|
if (result[3] && result[3].code === 200) {
|
|
|
Object.assign(finalResult.list.leftContent, searchHandler.handleWeekNew(result[3].data, params));
|
|
|
Object.assign(finalResult.list.leftContent, searchHandler.handleWeekNew(result[3].data, dps));
|
|
|
}
|
|
|
|
|
|
finalResult.criteo = {skn: searchHandler.getCriteo(_.get(finalResult.list, 'goods'))};
|
...
|
...
|
@@ -247,8 +255,13 @@ exports.getBrandData = (params, extra, channel) => { |
|
|
|
|
|
// 获取左侧类目数据
|
|
|
if (result[1].code === 200) {
|
|
|
let dps = {};
|
|
|
|
|
|
if (params.gender) {
|
|
|
dps.gender = params.gender;
|
|
|
}
|
|
|
Object.assign(finalResult.brand, {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, dps)
|
|
|
}, searchHandler.handlePathNavData(extra, params, 'brand', channel));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -564,7 +577,8 @@ exports.getShopData = (shopId, channel, params, shopInfo) => { |
|
|
for (let i = 0; i < 3; i++) {
|
|
|
trendList.push({
|
|
|
href: articleList[i].url,
|
|
|
src: articleList[i].src,
|
|
|
src: helpers.getForceSourceUrl(articleList[i].src) +
|
|
|
'?imageView/1/w/{width}/h/{height}',
|
|
|
mainTitle: articleList[i].title,
|
|
|
Subtitle: articleList[i].intro
|
|
|
});
|
...
|
...
|
|