|
@@ -76,7 +76,7 @@ const getListData = (params, channel) => { |
|
@@ -76,7 +76,7 @@ const getListData = (params, channel) => { |
76
|
let apiMethod = [
|
76
|
let apiMethod = [
|
77
|
headerModel.requestHeaderData(channel),
|
77
|
headerModel.requestHeaderData(channel),
|
78
|
searchApi.getSortList(Object.assign({}, {msort: '', misort: ''})),
|
78
|
searchApi.getSortList(Object.assign({}, {msort: '', misort: ''})),
|
79
|
- searchApi.getProductList(searchParams)
|
79
|
+ searchApi.getProductList(searchParams, 'categoryList')
|
80
|
];
|
80
|
];
|
81
|
|
81
|
|
82
|
// 搜索分类介绍和广告
|
82
|
// 搜索分类介绍和广告
|
|
@@ -290,7 +290,7 @@ const getBrandData = (params, extra, channel) => { |
|
@@ -290,7 +290,7 @@ const getBrandData = (params, extra, channel) => { |
290
|
let apiMethod = [
|
290
|
let apiMethod = [
|
291
|
headerModel.requestHeaderData(channel),
|
291
|
headerModel.requestHeaderData(channel),
|
292
|
searchApi.getSortList(queryBase),
|
292
|
searchApi.getSortList(queryBase),
|
293
|
- searchApi.getProductList(Object.assign(searchParams, queryBase))
|
293
|
+ searchApi.getProductList(Object.assign(searchParams, queryBase), 'brand')
|
294
|
];
|
294
|
];
|
295
|
|
295
|
|
296
|
if (queryBase.brand) {
|
296
|
if (queryBase.brand) {
|
|
@@ -588,7 +588,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
|
@@ -588,7 +588,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
588
|
searchApi.getShopDecorator(shopId), // 店铺装修数据
|
588
|
searchApi.getShopDecorator(shopId), // 店铺装修数据
|
589
|
searchApi.getProductList(Object.assign({
|
589
|
searchApi.getProductList(Object.assign({
|
590
|
shop_id: shopId
|
590
|
shop_id: shopId
|
591
|
- }, params)), // 搜索店铺商品
|
591
|
+ }, params), 'shop'), // 搜索店铺商品
|
592
|
searchApi.getShopBrands(shopId), // 店铺品牌数据
|
592
|
searchApi.getShopBrands(shopId), // 店铺品牌数据
|
593
|
shopApi.shopCouponListAsync(shopId) // 店铺优惠券数据
|
593
|
shopApi.shopCouponListAsync(shopId) // 店铺优惠券数据
|
594
|
]).then(result => {
|
594
|
]).then(result => {
|
|
@@ -647,7 +647,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
|
@@ -647,7 +647,7 @@ const getShopData = (shopId, channel, params, shopInfo) => { |
647
|
searchApi.getProductList({
|
647
|
searchApi.getProductList({
|
648
|
viewNum: sknList.length,
|
648
|
viewNum: sknList.length,
|
649
|
query: _.join(_.uniq(sknList), ',')
|
649
|
query: _.join(_.uniq(sknList), ',')
|
650
|
- })
|
650
|
+ }, 'shop')
|
651
|
];
|
651
|
];
|
652
|
|
652
|
|
653
|
if (result[3].code === 200 && result[3].data) {
|
653
|
if (result[3].code === 200 && result[3].data) {
|
|
@@ -757,7 +757,7 @@ const getShopGoodsData = (shopId, channel, params) => { |
|
@@ -757,7 +757,7 @@ const getShopGoodsData = (shopId, channel, params) => { |
757
|
return Promise.all([
|
757
|
return Promise.all([
|
758
|
searchApi.getProductList(Object.assign({
|
758
|
searchApi.getProductList(Object.assign({
|
759
|
shop_id: shopId
|
759
|
shop_id: shopId
|
760
|
- }, params)), // 搜索店铺商品
|
760
|
+ }, params), 'shop'), // 搜索店铺商品
|
761
|
searchApi.getSortList({shop_id: shopId}) // 根据店铺id获取分类
|
761
|
searchApi.getSortList({shop_id: shopId}) // 根据店铺id获取分类
|
762
|
]).then(result => {
|
762
|
]).then(result => {
|
763
|
// 获取商品数据和顶部筛选条件
|
763
|
// 获取商品数据和顶部筛选条件
|
|
@@ -793,14 +793,14 @@ const getShopListData = (channel, params, uid) => { |
|
@@ -793,14 +793,14 @@ const getShopListData = (channel, params, uid) => { |
793
|
searchApi.getShopDecorator(shopId), // 店铺装修数据
|
793
|
searchApi.getShopDecorator(shopId), // 店铺装修数据
|
794
|
searchApi.getShopInfo(shopId, uid), // 店铺介绍
|
794
|
searchApi.getShopInfo(shopId, uid), // 店铺介绍
|
795
|
searchApi.getProductList(Object.assign({shop_id: shopId}, params,
|
795
|
searchApi.getProductList(Object.assign({shop_id: shopId}, params,
|
796
|
- {limit: (params.limit || 60) - 1})), // 搜索店铺商品
|
796
|
+ {limit: (params.limit || 60) - 1}), 'shop'), // 搜索店铺商品
|
797
|
searchApi.getSortList({shop_id: shopId}) // 店铺分类
|
797
|
searchApi.getSortList({shop_id: shopId}) // 店铺分类
|
798
|
];
|
798
|
];
|
799
|
|
799
|
|
800
|
if (_.has(params, 'query')) {
|
800
|
if (_.has(params, 'query')) {
|
801
|
// 如果有店内搜索,则并行查询店铺所有商品,搜索不到商品则显示所有商品
|
801
|
// 如果有店内搜索,则并行查询店铺所有商品,搜索不到商品则显示所有商品
|
802
|
apiArr.push(searchApi.getProductList(Object.assign({shop_id: shopId},
|
802
|
apiArr.push(searchApi.getProductList(Object.assign({shop_id: shopId},
|
803
|
- params, {query: ''}))); // 搜索店铺所有商品
|
803
|
+ params, {query: ''}), 'shop')); // 搜索店铺所有商品
|
804
|
}
|
804
|
}
|
805
|
|
805
|
|
806
|
|
806
|
|