...
|
...
|
@@ -197,21 +197,6 @@ const index = (req) => { |
|
|
Object.assign(respData, searchHandler.handlePathNavData({}, {}, 'new', channel));
|
|
|
|
|
|
if (result[1].code === 200 && result[1].data) {
|
|
|
let shopsData = _.get(result, '[1].data.shop_list', []),
|
|
|
dataList = [];
|
|
|
|
|
|
_.forEach(shopsData, shop => {
|
|
|
dataList.push({
|
|
|
url: helpers.urlFormat('', {shopId: shop.shops_id}, shop.shop_domain),
|
|
|
src: shop.shop_logo,
|
|
|
num: shop.new_product_num,
|
|
|
shopId: shop.shops_id,
|
|
|
brandId: shop.brand_id
|
|
|
});
|
|
|
});
|
|
|
|
|
|
// 为您推荐
|
|
|
Object.assign(respData.recommond.dataList, dataList);
|
|
|
|
|
|
_.forEach(_.get(result, '[1].data.ads', []), ads => {
|
|
|
// banner
|
...
|
...
|
@@ -229,6 +214,34 @@ const index = (req) => { |
|
|
|
|
|
// 新品牌入驻
|
|
|
if (result[2].code === 200 && result[2].data) {
|
|
|
let hotBrandsData = _.get(result, '[2].data.hot_brand_list', []),
|
|
|
browseBrandsData = _.get(result, '[2].data.browse_brand_list', []),
|
|
|
recList = [];
|
|
|
|
|
|
_.forEach(hotBrandsData, hotBrand => {
|
|
|
recList.push({
|
|
|
url: helpers.urlFormat('', {shopId: hotBrand.shops_id}, hotBrand.shop_domain),
|
|
|
src: hotBrand.shop_logo,
|
|
|
num: hotBrand.new_product_num,
|
|
|
shopId: hotBrand.shops_id,
|
|
|
brandId: hotBrand.brand_id
|
|
|
});
|
|
|
});
|
|
|
|
|
|
_.forEach(browseBrandsData, browseBrand => {
|
|
|
recList.push({
|
|
|
url: helpers.urlFormat('', {shopId: browseBrand.shops_id}, browseBrand.shop_domain),
|
|
|
src: browseBrand.shop_logo,
|
|
|
num: browseBrand.new_product_num,
|
|
|
shopId: browseBrand.shops_id,
|
|
|
brandId: browseBrand.brand_id
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
// 为您推荐
|
|
|
Object.assign(respData.recommond.dataList, recList);
|
|
|
|
|
|
let brandsData = _.get(result, '[2].data.new_brand_list', []),
|
|
|
brandList = [];
|
|
|
|
...
|
...
|
|