...
|
...
|
@@ -76,7 +76,7 @@ const getListData = (params, channel) => { |
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(Object.assign({}, {msort: '', misort: ''})),
|
|
|
searchApi.getProductList(searchParams)
|
|
|
searchApi.getProductList(searchParams, 'categoryList')
|
|
|
];
|
|
|
|
|
|
// 搜索分类介绍和广告
|
...
|
...
|
@@ -290,7 +290,7 @@ const getBrandData = (params, extra, channel) => { |
|
|
let apiMethod = [
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
searchApi.getSortList(queryBase),
|
|
|
searchApi.getProductList(Object.assign(searchParams, queryBase))
|
|
|
searchApi.getProductList(Object.assign(searchParams, queryBase), 'brand')
|
|
|
];
|
|
|
|
|
|
if (queryBase.brand) {
|
...
|
...
|
@@ -588,7 +588,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
|
|
searchApi.getShopDecorator(shopId), // 店铺装修数据
|
|
|
searchApi.getProductList(Object.assign({
|
|
|
shop_id: shopId
|
|
|
}, params)), // 搜索店铺商品
|
|
|
}, params), 'shop'), // 搜索店铺商品
|
|
|
searchApi.getShopBrands(shopId), // 店铺品牌数据
|
|
|
shopApi.shopCouponListAsync(shopId) // 店铺优惠券数据
|
|
|
]).then(result => {
|
...
|
...
|
@@ -647,7 +647,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
|
|
searchApi.getProductList({
|
|
|
viewNum: sknList.length,
|
|
|
query: _.join(_.uniq(sknList), ',')
|
|
|
})
|
|
|
}, 'shop')
|
|
|
];
|
|
|
|
|
|
if (result[3].code === 200 && result[3].data) {
|
...
|
...
|
@@ -757,7 +757,7 @@ const getShopGoodsData = (shopId, channel, params) => { |
|
|
return Promise.all([
|
|
|
searchApi.getProductList(Object.assign({
|
|
|
shop_id: shopId
|
|
|
}, params)), // 搜索店铺商品
|
|
|
}, params), 'shop'), // 搜索店铺商品
|
|
|
searchApi.getSortList({shop_id: shopId}) // 根据店铺id获取分类
|
|
|
]).then(result => {
|
|
|
// 获取商品数据和顶部筛选条件
|
...
|
...
|
@@ -793,14 +793,14 @@ const getShopListData = (channel, params, uid) => { |
|
|
searchApi.getShopDecorator(shopId), // 店铺装修数据
|
|
|
searchApi.getShopInfo(shopId, uid), // 店铺介绍
|
|
|
searchApi.getProductList(Object.assign({shop_id: shopId}, params,
|
|
|
{limit: (params.limit || 60) - 1})), // 搜索店铺商品
|
|
|
{limit: (params.limit || 60) - 1}), 'shop'), // 搜索店铺商品
|
|
|
searchApi.getSortList({shop_id: shopId}) // 店铺分类
|
|
|
];
|
|
|
|
|
|
if (_.has(params, 'query')) {
|
|
|
// 如果有店内搜索,则并行查询店铺所有商品,搜索不到商品则显示所有商品
|
|
|
apiArr.push(searchApi.getProductList(Object.assign({shop_id: shopId},
|
|
|
params, {query: ''}))); // 搜索店铺所有商品
|
|
|
params, {query: ''}), 'shop')); // 搜索店铺所有商品
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|