...
|
...
|
@@ -133,8 +133,11 @@ const _handelGlobalSort = (origin, params, originParams) => { |
|
|
};
|
|
|
|
|
|
const getGlobalProductListData = (params, yoho) => {
|
|
|
let limitNum = params.limit ? params.limit - 1 : 59;
|
|
|
let dps = {};
|
|
|
|
|
|
params.page = params.page || 1;
|
|
|
|
|
|
if (params.brand) {
|
|
|
dps.brand = params.brand;
|
|
|
}
|
...
|
...
|
@@ -147,7 +150,7 @@ const getGlobalProductListData = (params, yoho) => { |
|
|
}, dps)),
|
|
|
list: globalApi.getGlobalProductListAsync(Object.assign({
|
|
|
physical_channel: yoho.channelNum
|
|
|
}, params, {limit: params.limit ? params.limit - 1 : 59}))
|
|
|
}, params, {limit: limitNum}))
|
|
|
}).then(result => {
|
|
|
let resData = {};
|
|
|
|
...
|
...
|
@@ -157,6 +160,12 @@ const getGlobalProductListData = (params, yoho) => { |
|
|
let listData = _.get(result.list, 'data', {});
|
|
|
let totalNum = _.get(listData, 'total', 0);
|
|
|
|
|
|
let tip = {
|
|
|
start: (params.page - 1) * limitNum + 1,
|
|
|
total: listData.total || '',
|
|
|
end: _.min([listData.total, limitNum * params.page])
|
|
|
};
|
|
|
|
|
|
// opts 显示新品、折扣
|
|
|
listData.filter = listData.filter || {};
|
|
|
Object.assign(listData.filter, {
|
...
|
...
|
@@ -169,7 +178,7 @@ const getGlobalProductListData = (params, yoho) => { |
|
|
filters: searchHandler.handleFilterDataAll(listData, params),
|
|
|
opts: searchHandler.handleOptsData(params, totalNum, listData.filter),
|
|
|
totalCount: totalNum,
|
|
|
footPager: pager(_.get(listData, 'page_total', 0), params),
|
|
|
footPager: Object.assign({tip: tip}, pager(_.get(listData, 'page_total', 0), params)),
|
|
|
goods: productProcess.processProductList(_.get(listData, 'product_list', []),
|
|
|
Object.assign({showDiscount: false, isGlobal: true}, params)),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, totalNum),
|
...
|
...
|
|