Merge branch 'feature/web-list' of git.dev.yoho.cn:web/yohobuy into feature/web-list
Showing
1 changed file
with
7 additions
and
18 deletions
@@ -24,7 +24,7 @@ class BrandsModel { | @@ -24,7 +24,7 @@ class BrandsModel { | ||
24 | * 搜索品牌数据 | 24 | * 搜索品牌数据 |
25 | * | 25 | * |
26 | * @param $condition array | 26 | * @param $condition array |
27 | - * 搜索数据的条件 | 27 | + * 搜索数据的条件 |
28 | * @param $options array | 28 | * @param $options array |
29 | * @return array | 29 | * @return array |
30 | */ | 30 | */ |
@@ -32,8 +32,11 @@ class BrandsModel { | @@ -32,8 +32,11 @@ class BrandsModel { | ||
32 | 32 | ||
33 | // 调用商品搜索接口 | 33 | // 调用商品搜索接口 |
34 | $data = SearchData::searchElasticByCondition($condition); | 34 | $data = SearchData::searchElasticByCondition($condition); |
35 | + | ||
35 | //获取品牌banner数据 | 36 | //获取品牌banner数据 |
36 | $banner = self::getBannerByDomain($domain, $brandId, $uid = ''); | 37 | $banner = self::getBannerByDomain($domain, $brandId, $uid = ''); |
38 | + $brandName = self::$shopName; | ||
39 | + $options['brandName'] = $brandName; | ||
37 | 40 | ||
38 | if (isset($data['code']) && $data['code'] === 200) { | 41 | if (isset($data['code']) && $data['code'] === 200) { |
39 | //获取分类列表数据 | 42 | //获取分类列表数据 |
@@ -43,18 +46,15 @@ class BrandsModel { | @@ -43,18 +46,15 @@ class BrandsModel { | ||
43 | if (isset($classes['code']) && $classes['code'] === 200) { | 46 | if (isset($classes['code']) && $classes['code'] === 200) { |
44 | $data['data']['filter']['group_sort'] = $classes['data']['sort']; | 47 | $data['data']['filter']['group_sort'] = $classes['data']['sort']; |
45 | } | 48 | } |
46 | - | ||
47 | - $brandName = self::$shopName; | ||
48 | - $options['brandName'] = $brandName; | ||
49 | - | ||
50 | 49 | ||
51 | //用户浏览记录 | 50 | //用户浏览记录 |
52 | 51 | ||
52 | + | ||
53 | // 组织模板数据 | 53 | // 组织模板数据 |
54 | $list = HelperSearch::getList($data, $options); | 54 | $list = HelperSearch::getList($data, $options); |
55 | 55 | ||
56 | //合并商品搜索数据与品牌banner数据 | 56 | //合并商品搜索数据与品牌banner数据 |
57 | - $data = array_merge_recursive($data, $banner); | 57 | + $list = array_merge_recursive($list,$banner); |
58 | 58 | ||
59 | $data = array( | 59 | $data = array( |
60 | //初始化js | 60 | //初始化js |
@@ -65,19 +65,10 @@ class BrandsModel { | @@ -65,19 +65,10 @@ class BrandsModel { | ||
65 | $data = array(); | 65 | $data = array(); |
66 | } | 66 | } |
67 | 67 | ||
68 | - | ||
69 | - | ||
70 | - | ||
71 | //获取品牌系列数据 | 68 | //获取品牌系列数据 |
72 | $adNav = self::getAdNav($condition['brand']); | 69 | $adNav = self::getAdNav($condition['brand']); |
73 | $data['list']['leftContent'][] = array('picLink' => $adNav); | 70 | $data['list']['leftContent'][] = array('picLink' => $adNav); |
74 | 71 | ||
75 | - | ||
76 | - | ||
77 | - | ||
78 | - | ||
79 | - | ||
80 | - | ||
81 | return $data; | 72 | return $data; |
82 | } | 73 | } |
83 | 74 | ||
@@ -123,7 +114,6 @@ class BrandsModel { | @@ -123,7 +114,6 @@ class BrandsModel { | ||
123 | 114 | ||
124 | // 返回banner数据 | 115 | // 返回banner数据 |
125 | return array( | 116 | return array( |
126 | - 'list' => array( | ||
127 | 'brandBanner' => array( | 117 | 'brandBanner' => array( |
128 | 'bannerHeight' => '150', | 118 | 'bannerHeight' => '150', |
129 | 'coled' => $is_favorite, | 119 | 'coled' => $is_favorite, |
@@ -144,8 +134,7 @@ class BrandsModel { | @@ -144,8 +134,7 @@ class BrandsModel { | ||
144 | ) | 134 | ) |
145 | ) | 135 | ) |
146 | ) | 136 | ) |
147 | - ) | ||
148 | - ); | 137 | + ); |
149 | } | 138 | } |
150 | 139 | ||
151 | //获取品牌系列数据 | 140 | //获取品牌系列数据 |
-
Please register or login to post a comment