...
|
...
|
@@ -47,11 +47,14 @@ const _getGender = (channel) => { |
|
|
* 获取商品分类列表数据
|
|
|
*/
|
|
|
exports.getListData = (params, channel) => {
|
|
|
|
|
|
let searchParams = searchHandler.getSearchParams(params);
|
|
|
|
|
|
// 调用接口
|
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(),
|
|
|
searchApi.getProductList(params)
|
|
|
searchApi.getSortList(params),
|
|
|
searchApi.getProductList(searchParams)
|
|
|
];
|
|
|
|
|
|
// 搜索分类介绍和广告
|
...
|
...
|
@@ -93,6 +96,7 @@ exports.getListData = (params, channel) => { |
|
|
footPager: searchHandler.handlePagerData(result[2].data.total, params),
|
|
|
goods: productProcess.processProductList(result[2].data.product_list,
|
|
|
Object.assign({showDiscount: false}, params)),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
|
|
|
|
|
|
// 最近浏览记录
|
|
|
latestWalk: 7
|
...
|
...
|
@@ -124,11 +128,13 @@ exports.getListData = (params, channel) => { |
|
|
*/
|
|
|
exports.getListNewData = (params, channel) => {
|
|
|
|
|
|
let searchParams = searchHandler.getSearchParams(params);
|
|
|
|
|
|
// 调用接口
|
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(),
|
|
|
searchApi.getProductList(Object.assign({new: 'Y'}, params)),
|
|
|
searchApi.getSortList(searchParams),
|
|
|
searchApi.getProductList(Object.assign({new: 'Y'}, searchParams)),
|
|
|
searchApi.getWeekNew(params)
|
|
|
];
|
|
|
|
...
|
...
|
@@ -159,6 +165,7 @@ exports.getListNewData = (params, channel) => { |
|
|
footPager: searchHandler.handlePagerData(result[2].data.total, params),
|
|
|
goods: productProcess.processProductList(result[2].data.product_list,
|
|
|
Object.assign({showDiscount: false}, params)),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
|
|
|
|
|
|
// 最近浏览记录
|
|
|
latestWalk: 7
|
...
|
...
|
@@ -211,14 +218,16 @@ exports.getBrandInfo = (params) => { |
|
|
*/
|
|
|
exports.getBrandData = (params, extra, channel) => {
|
|
|
|
|
|
let searchParams = searchHandler.getSearchParams(params);
|
|
|
|
|
|
// 设置品牌默认排序方式
|
|
|
let order = params.order || 'b_w_desc';
|
|
|
|
|
|
// 调用接口
|
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList({brand: extra.brandId}),
|
|
|
searchApi.getProductList(Object.assign({order: order, brand: extra.brandId}, params))
|
|
|
searchApi.getSortList(Object.assign({}, params, {brand: extra.brandId})),
|
|
|
searchApi.getProductList(Object.assign({order: order, brand: extra.brandId}, searchParams))
|
|
|
|
|
|
];
|
|
|
|
...
|
...
|
@@ -250,6 +259,7 @@ exports.getBrandData = (params, extra, channel) => { |
|
|
footPager: searchHandler.handlePagerData(result[2].data.total, params),
|
|
|
goods: productProcess.processProductList(result[2].data.product_list,
|
|
|
Object.assign({showDiscount: false}, params)),
|
|
|
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
|
|
|
|
|
|
// 最近浏览记录
|
|
|
latestWalk: 7
|
...
|
...
|
|