Authored by yangyang

广告位修改

... ... @@ -34,7 +34,7 @@ class BrandData
// 构建必传参数
$param = Yohobuy::param();
$param['brand_id'] = $brandId;
$param['uid'] = '10267443';
$param['uid'] = $uid;
$param['method'] = 'app.brand.getBrandIntro';
$param['client_secret'] = Sign::getSign($param);
... ...
... ... @@ -28,8 +28,7 @@ class BrandsModel {
* @param $options array
* @return array
*/
public static function getBrandSearchData($condition, $options, $domain, $uid, $brandId) {
public static function getBrandSearchData($condition, $options, $domain, $uid, $brandId,$node) {
// 调用商品搜索接口
$data = SearchData::searchElasticByCondition($condition);
... ... @@ -69,9 +68,20 @@ class BrandsModel {
$adNav = self::getAdNav($condition['brand']);
$data['list']['leftContent'][] = array('picLink' => $adNav);
//获取静态内容(20141219-100447)
if($node){
$nodeContent = BrandData::getByNodeContent($node);
if(isset($nodeContent['code']) && $nodeContent['code'] === 200){
$result = $nodeContent['data'];
//接口返回html格式,非前端需要格式。
}
}
return $data;
}
/**
* 获取品牌首页banner条
* @string $domain 品牌域名
... ...
... ... @@ -20,6 +20,7 @@ class IndexController extends WebAction
$brandInfo = BrandData::getBrandLogoByDomain($domain);
if(!empty($brandInfo['data']) && $brandInfo['code'] === 200){
$brandId = $brandInfo['data']['id'];
$node = isset($brandInfo['static_content_code']) ? $brandInfo['static_content_code'] : false;
}else{
$this->go(SITE_MAIN);
}
... ... @@ -92,7 +93,7 @@ class IndexController extends WebAction
$params = $condition + $_GET;
$params = array_filter($params);
$data = Product\BrandsModel::getBrandSearchData($params,$options,$domain,$uid,$brandId);
$data = Product\BrandsModel::getBrandSearchData($params,$options,$domain,$uid,$brandId,$node);
$cate = array('boys','girls','kids','lifestyle');
$this->setWebNavHeader($cate[$gender-1]);
//渲染模板
... ...
... ... @@ -854,6 +854,7 @@ class Index1Controller extends AbstractAction
),
array(
'picLink' => array(
array(
'title' => 'AAAA',
'list' => array(
array(
... ... @@ -865,6 +866,17 @@ class Index1Controller extends AbstractAction
'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
)
)
),
array(
array(
'href' => 'http://adidas.yohobuy.com/?folder=1366',
'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
),
array(
'href' => 'http://adidas.yohobuy.com/?folder=1366',
'src' => 'http://img12.static.yhbimg.com/brandBanner/2015/02/04/06/0216e9a4c1c1edb0c8fe6b4347cc5a8035.jpg'
)
)
)
),
array(
... ...