Authored by yangyang

修改Brands.php

@@ -32,6 +32,9 @@ class BrandsModel { @@ -32,6 +32,9 @@ class BrandsModel {
32 32
33 // 调用商品搜索接口 33 // 调用商品搜索接口
34 $data = SearchData::searchElasticByCondition($condition); 34 $data = SearchData::searchElasticByCondition($condition);
  35 + //获取品牌banner数据
  36 + $banner = self::getBannerByDomain($domain, $brandId, $uid = '');
  37 +
35 if (isset($data['code']) && $data['code'] === 200) { 38 if (isset($data['code']) && $data['code'] === 200) {
36 //获取分类列表数据 39 //获取分类列表数据
37 $param = array(); 40 $param = array();
@@ -43,8 +46,11 @@ class BrandsModel { @@ -43,8 +46,11 @@ class BrandsModel {
43 46
44 $brandName = self::$shopName; 47 $brandName = self::$shopName;
45 $options['brandName'] = $brandName; 48 $options['brandName'] = $brandName;
46 - 49 + //合并商品搜索数据与品牌banner数据
  50 + $data = array_merge_recursive($data, $banner);
  51 +
47 //用户浏览记录 52 //用户浏览记录
  53 +
48 // 组织模板数据 54 // 组织模板数据
49 $list = HelperSearch::getList($data, $options); 55 $list = HelperSearch::getList($data, $options);
50 $data = array( 56 $data = array(
@@ -56,9 +62,7 @@ class BrandsModel { @@ -56,9 +62,7 @@ class BrandsModel {
56 $data = array(); 62 $data = array();
57 } 63 }
58 64
59 - //获取品牌数据  
60 - $banner = self::getBannerByDomain($domain, $brandId, $uid = '');  
61 - $data = array_merge_recursive($data, $banner); 65 +
62 66
63 67
64 //获取品牌系列数据 68 //获取品牌系列数据