...
|
...
|
@@ -53,7 +53,7 @@ exports.getListData = (params, channel) => { |
|
|
// 调用接口
|
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(params),
|
|
|
searchApi.getSortList(Object.assign({}, params, {msort: '', misort: ''})),
|
|
|
searchApi.getProductList(searchParams)
|
|
|
];
|
|
|
|
...
|
...
|
@@ -81,9 +81,10 @@ exports.getListData = (params, channel) => { |
|
|
|
|
|
// 获取左侧类目数据
|
|
|
if (result[1].code === 200) {
|
|
|
finalResult.list = Object.assign(searchHandler.handlePathNavData(result[1].data.sort, params, 'sort'), {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
});
|
|
|
finalResult.list = Object.assign(
|
|
|
searchHandler.handlePathNavData(result[1].data.sort, params, 'sort', channel), {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
...
|
...
|
@@ -133,7 +134,7 @@ exports.getListNewData = (params, channel) => { |
|
|
// 调用接口
|
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(searchParams),
|
|
|
searchApi.getSortList(Object.assign({}, searchParams, {msort: '', misort: ''})),
|
|
|
searchApi.getProductList(Object.assign({new: 'Y'}, searchParams)),
|
|
|
searchApi.getWeekNew(params)
|
|
|
];
|
...
|
...
|
@@ -150,9 +151,10 @@ exports.getListNewData = (params, channel) => { |
|
|
|
|
|
// 获取左侧类目数据
|
|
|
if (result[1].code === 200) {
|
|
|
finalResult.list = Object.assign(searchHandler.handlePathNavData(result[1].data.sort, params, 'new'), {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
});
|
|
|
finalResult.list = Object.assign(
|
|
|
searchHandler.handlePathNavData(result[1].data.sort, params, 'new', channel), {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
...
|
...
|
@@ -226,7 +228,7 @@ exports.getBrandData = (params, extra, channel) => { |
|
|
// 调用接口
|
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(Object.assign({}, params, {brand: extra.brandId})),
|
|
|
searchApi.getSortList(Object.assign({}, params, {brand: extra.brandId, msort: '', misort: ''})),
|
|
|
searchApi.getProductList(Object.assign({order: order, brand: extra.brandId}, searchParams))
|
|
|
|
|
|
];
|
...
|
...
|
@@ -247,7 +249,7 @@ exports.getBrandData = (params, extra, channel) => { |
|
|
if (result[1].code === 200) {
|
|
|
Object.assign(finalResult.brand, {
|
|
|
leftContent: searchHandler.handleSortData(result[1].data.sort, params)
|
|
|
}, searchHandler.handlePathNavData(extra, params, 'brand'));
|
|
|
}, searchHandler.handlePathNavData(extra, params, 'brand', channel));
|
|
|
}
|
|
|
|
|
|
// 获取商品数据和顶部筛选条件
|
...
|
...
|
@@ -443,7 +445,7 @@ exports.getShopData = (shopId, channel, params, shopInfo) => { |
|
|
|
|
|
Object.assign(finalResult,
|
|
|
result[0], // 头部数据
|
|
|
searchHandler.handlePathNavData(shopInfo, params, 'shop') // 面包屑导航
|
|
|
searchHandler.handlePathNavData(shopInfo, params, 'shop', channel) // 面包屑导航
|
|
|
);
|
|
|
|
|
|
_.set(finalResult, 'headerData.header', true);
|
...
|
...
|
@@ -578,7 +580,7 @@ exports.getShopListData = (channel, params, uid) => { |
|
|
};
|
|
|
|
|
|
// 面包屑导航
|
|
|
Object.assign(finalResult, searchHandler.handlePathNavData({}, params, 'shop'));
|
|
|
Object.assign(finalResult, searchHandler.handlePathNavData({}, params, 'shop', channel));
|
|
|
|
|
|
// 店铺装修
|
|
|
if (result[1].code === 200) {
|
...
|
...
|
|