...
|
...
|
@@ -118,7 +118,9 @@ const getListData = (params, channel) => { |
|
|
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)),
|
|
|
Object.assign({showDiscount: false}, params, {
|
|
|
from: {type: 'list', params: params}
|
|
|
})),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
|
|
|
|
|
|
// 最近浏览记录
|
...
|
...
|
@@ -194,7 +196,8 @@ const getListNewData = (params, channel) => { |
|
|
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, showNew: false}, params)),
|
|
|
Object.assign({showDiscount: false, showNew: false,
|
|
|
from: {type: 'listNew', params: params}}, params)),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
|
|
|
|
|
|
// 最近浏览记录
|
...
|
...
|
@@ -265,7 +268,7 @@ const getBrandData = (params, extra, channel) => { |
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(queryBase),
|
|
|
searchApi.getProductList(Object.assign({order: order}, searchParams, queryBase))
|
|
|
searchApi.getProductList(Object.assign(searchParams, {order: order}, queryBase))
|
|
|
|
|
|
];
|
|
|
|
...
|
...
|
@@ -304,16 +307,16 @@ const getBrandData = (params, extra, channel) => { |
|
|
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)),
|
|
|
Object.assign({showDiscount: false, from: {type: 'brand', params: params}}, params)),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
|
|
|
|
|
|
// 最近浏览记录
|
|
|
latestWalk: 7
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 品牌页不显示品牌筛选项
|
|
|
delete finalResult.brand.filters.brand;
|
|
|
_.unset(finalResult, 'brand.filters.brand');
|
|
|
}
|
|
|
|
|
|
finalResult.criteo = {skn: searchHandler.getCriteo(_.get(finalResult.brand, 'goods'))};
|
|
|
|
...
|
...
|
@@ -417,7 +420,7 @@ const getShopAbout = (shopId, uid, channel) => { |
|
|
|
|
|
if (result[1].code === 200) {
|
|
|
let data = result[1].data || {},
|
|
|
decorator = shopHandler.getShopDecorator(data, {}, shopId);
|
|
|
decorator = shopHandler.getShopDecorator(data, {}, shopId, true);
|
|
|
|
|
|
Object.assign(decorator.shopTopBannerBase, {
|
|
|
shopId: shopId,
|
...
|
...
|
@@ -637,7 +640,8 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
|
|
finalResult.leftContent = searchHandler.handleSortData(groupSort, params);
|
|
|
|
|
|
if (finalResult.allGoods) {
|
|
|
Object.assign(finalResult.allGoods, searchHandler.setShopSort(groupSort, params));
|
|
|
Object.assign(finalResult.allGoods, searchHandler.setShopSort(groupSort, Object.assign({},
|
|
|
params, {page: 1})));
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -652,7 +656,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
|
|
|
|
|
for (let i = 0; i < 3; i++) {
|
|
|
trendList.push({
|
|
|
href: articleList[i].url,
|
|
|
href: helpers.urlFormat(`/${articleList[i].id}.html`, '', 'guang'),
|
|
|
src: helpers.getForceSourceUrl(articleList[i].src) +
|
|
|
'?imageView/1/w/{width}/h/{height}',
|
|
|
mainTitle: articleList[i].title,
|
...
|
...
|
@@ -712,7 +716,8 @@ const getShopGoodsData = (shopId, channel, params) => { |
|
|
if (subRes.code === 200) {
|
|
|
let groupSort = _.get(subRes, 'data.sort', []);
|
|
|
|
|
|
Object.assign(resData, searchHandler.setShopSort(groupSort, params));
|
|
|
Object.assign(resData, searchHandler.setShopSort(groupSort, Object.assign(params,
|
|
|
{page: 1})));
|
|
|
}
|
|
|
|
|
|
return resData;
|
...
|
...
|
@@ -794,6 +799,9 @@ const getShopListData = (channel, params, uid) => { |
|
|
}),
|
|
|
footPager: {tip: tip}
|
|
|
});
|
|
|
|
|
|
_.set(finalResult, 'filters.checkedConditions.clearUrl',
|
|
|
`?navBar=${params.navBar}&shopId=${params.shopId}`);
|
|
|
} else {
|
|
|
finalResult.searchEmpty = true;
|
|
|
|
...
|
...
|
@@ -886,6 +894,11 @@ const getBaseShopData = (params, extra, channel, shopId) => { |
|
|
});
|
|
|
}
|
|
|
|
|
|
// 临时删除seo信息
|
|
|
_.unset(resData, 'title');
|
|
|
_.unset(resData, 'keywords');
|
|
|
_.unset(resData, 'description');
|
|
|
|
|
|
return resData;
|
|
|
});
|
|
|
};
|
...
|
...
|
|