Authored by 周少峰

path nav

... ... @@ -78,10 +78,9 @@ exports.getListData = (params, channel) => {
// 获取左侧类目数据
if (result[1].code === 200) {
finalResult.list = {
leftContent: searchHandler.handleSortData(result[1].data.sort, params),
pathNav: searchHandler.handlePathNavData(result[1].data.sort, params, 'sort')
};
finalResult.list = Object.assign(searchHandler.handlePathNavData(result[1].data.sort, params, 'sort'), {
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
});
}
// 获取商品数据和顶部筛选条件
... ... @@ -143,10 +142,9 @@ exports.getListNewData = (params, channel) => {
// 获取左侧类目数据
if (result[1].code === 200) {
finalResult.list = {
leftContent: searchHandler.handleSortData(result[1].data.sort, params),
pathNav: searchHandler.handlePathNavData(result[1].data.sort, params, 'new')
};
finalResult.list = Object.assign(searchHandler.handlePathNavData(result[1].data.sort, params, 'new'), {
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
});
}
// 获取商品数据和顶部筛选条件
... ...
... ... @@ -61,17 +61,18 @@ exports.getSearchData = (params, channel) => {
// 获取商品数据和顶部筛选条件
if (result[2].code === 200) {
Object.assign(finalResult.search, {
pathNav: searchHandler.handlePathNavData({total: result[2].data.total }, params, 'search'),
filters: searchHandler.handleFilterDataAll(result[2].data, params),
opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter),
totalCount: result[2].data.total,
footPager: searchHandler.handlePagerData(result[2].data.total, params),
goods: productProcess.processProductList(result[2].data.product_list,
Object.assign({showDiscount: false}, params)),
latestWalk: 7,
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
shopEntry: result[3]
Object.assign(
finalResult.search, searchHandler.handlePathNavData({total: result[2].data.total }, params, 'search'),
{
filters: searchHandler.handleFilterDataAll(result[2].data, params),
opts: searchHandler.handleOptsData(params, result[2].data.total, result[2].data.filter),
totalCount: result[2].data.total,
footPager: searchHandler.handlePagerData(result[2].data.total, params),
goods: productProcess.processProductList(result[2].data.product_list,
Object.assign({showDiscount: false}, params)),
latestWalk: 7,
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
shopEntry: result[3]
});
}
return finalResult;
... ...