Showing
4 changed files
with
27 additions
and
4 deletions
@@ -34,7 +34,7 @@ class BrandData | @@ -34,7 +34,7 @@ class BrandData | ||
34 | // 构建必传参数 | 34 | // 构建必传参数 |
35 | $param = Yohobuy::param(); | 35 | $param = Yohobuy::param(); |
36 | $param['brand_id'] = $brandId; | 36 | $param['brand_id'] = $brandId; |
37 | - $param['uid'] = '10267443'; | 37 | + $param['uid'] = $uid; |
38 | $param['method'] = 'app.brand.getBrandIntro'; | 38 | $param['method'] = 'app.brand.getBrandIntro'; |
39 | $param['client_secret'] = Sign::getSign($param); | 39 | $param['client_secret'] = Sign::getSign($param); |
40 | 40 |
@@ -28,8 +28,7 @@ class BrandsModel { | @@ -28,8 +28,7 @@ class BrandsModel { | ||
28 | * @param $options array | 28 | * @param $options array |
29 | * @return array | 29 | * @return array |
30 | */ | 30 | */ |
31 | - public static function getBrandSearchData($condition, $options, $domain, $uid, $brandId) { | ||
32 | - | 31 | + public static function getBrandSearchData($condition, $options, $domain, $uid, $brandId,$node) { |
33 | // 调用商品搜索接口 | 32 | // 调用商品搜索接口 |
34 | $data = SearchData::searchElasticByCondition($condition); | 33 | $data = SearchData::searchElasticByCondition($condition); |
35 | 34 | ||
@@ -69,9 +68,20 @@ class BrandsModel { | @@ -69,9 +68,20 @@ class BrandsModel { | ||
69 | $adNav = self::getAdNav($condition['brand']); | 68 | $adNav = self::getAdNav($condition['brand']); |
70 | $data['list']['leftContent'][] = array('picLink' => $adNav); | 69 | $data['list']['leftContent'][] = array('picLink' => $adNav); |
71 | 70 | ||
71 | + //获取静态内容(20141219-100447) | ||
72 | + if($node){ | ||
73 | + $nodeContent = BrandData::getByNodeContent($node); | ||
74 | + if(isset($nodeContent['code']) && $nodeContent['code'] === 200){ | ||
75 | + $result = $nodeContent['data']; | ||
76 | + //接口返回html格式,非前端需要格式。 | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
72 | return $data; | 80 | return $data; |
73 | } | 81 | } |
74 | 82 | ||
83 | + | ||
84 | + | ||
75 | /** | 85 | /** |
76 | * 获取品牌首页banner条 | 86 | * 获取品牌首页banner条 |
77 | * @string $domain 品牌域名 | 87 | * @string $domain 品牌域名 |
@@ -20,6 +20,7 @@ class IndexController extends WebAction | @@ -20,6 +20,7 @@ class IndexController extends WebAction | ||
20 | $brandInfo = BrandData::getBrandLogoByDomain($domain); | 20 | $brandInfo = BrandData::getBrandLogoByDomain($domain); |
21 | if(!empty($brandInfo['data']) && $brandInfo['code'] === 200){ | 21 | if(!empty($brandInfo['data']) && $brandInfo['code'] === 200){ |
22 | $brandId = $brandInfo['data']['id']; | 22 | $brandId = $brandInfo['data']['id']; |
23 | + $node = isset($brandInfo['static_content_code']) ? $brandInfo['static_content_code'] : false; | ||
23 | }else{ | 24 | }else{ |
24 | $this->go(SITE_MAIN); | 25 | $this->go(SITE_MAIN); |
25 | } | 26 | } |
@@ -92,7 +93,7 @@ class IndexController extends WebAction | @@ -92,7 +93,7 @@ class IndexController extends WebAction | ||
92 | 93 | ||
93 | $params = $condition + $_GET; | 94 | $params = $condition + $_GET; |
94 | $params = array_filter($params); | 95 | $params = array_filter($params); |
95 | - $data = Product\BrandsModel::getBrandSearchData($params,$options,$domain,$uid,$brandId); | 96 | + $data = Product\BrandsModel::getBrandSearchData($params,$options,$domain,$uid,$brandId,$node); |
96 | $cate = array('boys','girls','kids','lifestyle'); | 97 | $cate = array('boys','girls','kids','lifestyle'); |
97 | $this->setWebNavHeader($cate[$gender-1]); | 98 | $this->setWebNavHeader($cate[$gender-1]); |
98 | //渲染模板 | 99 | //渲染模板 |
@@ -854,6 +854,7 @@ class Index1Controller extends AbstractAction | @@ -854,6 +854,7 @@ class Index1Controller extends AbstractAction | ||
854 | ), | 854 | ), |
855 | array( | 855 | array( |
856 | 'picLink' => array( | 856 | 'picLink' => array( |
857 | + array( | ||
857 | 'title' => 'AAAA', | 858 | 'title' => 'AAAA', |
858 | 'list' => array( | 859 | 'list' => array( |
859 | array( | 860 | array( |
@@ -865,6 +866,17 @@ class Index1Controller extends AbstractAction | @@ -865,6 +866,17 @@ class Index1Controller extends AbstractAction | ||
865 | 'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg' | 866 | 'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg' |
866 | ) | 867 | ) |
867 | ) | 868 | ) |
869 | + ), | ||
870 | + array( | ||
871 | + array( | ||
872 | + 'href' => 'http://adidas.yohobuy.com/?folder=1366', | ||
873 | + 'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg' | ||
874 | + ), | ||
875 | + array( | ||
876 | + 'href' => 'http://adidas.yohobuy.com/?folder=1366', | ||
877 | + 'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg' | ||
878 | + ) | ||
879 | + ) | ||
868 | ) | 880 | ) |
869 | ), | 881 | ), |
870 | array( | 882 | array( |
-
Please register or login to post a comment