...
|
...
|
@@ -24,10 +24,13 @@ class IndexController extends WebAction |
|
|
}
|
|
|
$uid = $this->getUid();
|
|
|
//根据品牌域名获取品牌id(同时判断品牌域名是否有效)
|
|
|
$brandInfo = BrandData::getBrandLogoByDomain($domain);
|
|
|
if (!empty($brandInfo['data']) && $brandInfo['code'] === 200) {
|
|
|
$fields = 'id,brand_name,brand_name_cn,brand_name_en,brand_domain,brand_alif,brand_banner,brand_ico,static_content_code';
|
|
|
$brandInfo = BrandData::getBrandLogoByDomain($domain, $fields);
|
|
|
|
|
|
if (!empty($brandInfo['data']) && $brandInfo['code'] == 200) {
|
|
|
$brandId = $brandInfo['data']['id'];
|
|
|
$node = isset($brandInfo['static_content_code']) ? $brandInfo['static_content_code'] : false;
|
|
|
$node = isset($brandInfo['data']['static_content_code']) ? $brandInfo['data']['static_content_code'] : false;
|
|
|
$brandBanner = $brandInfo['data']['brand_banner'];
|
|
|
} else {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
...
|
...
|
@@ -42,6 +45,8 @@ class IndexController extends WebAction |
|
|
$options['uid'] = $uid;
|
|
|
$options['brandId'] = $brandId;
|
|
|
$options['node'] = $node;
|
|
|
$options['brandBanner'] = $brandBanner;
|
|
|
$options['reviewNum'] = 6;
|
|
|
|
|
|
//调用模型获得数据
|
|
|
$data = Product\BrandsModel::getBrandSearchData($condition, $options);
|
...
|
...
|
@@ -56,6 +61,51 @@ class IndexController extends WebAction |
|
|
$this->_view->display('list',$data);
|
|
|
}
|
|
|
|
|
|
//品牌介绍页
|
|
|
public function brandIntroAction()
|
|
|
{
|
|
|
//品牌域名
|
|
|
$domain = $this->param('named');
|
|
|
if (empty($domain)) {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
$uid = $this->getUid();
|
|
|
//根据品牌域名获取品牌id(同时判断品牌域名是否有效)
|
|
|
$fields = 'id,brand_name,brand_name_cn,brand_banner,brand_ico,brand_intro';
|
|
|
$brandInfo = BrandData::getBrandLogoByDomain($domain, $fields);
|
|
|
|
|
|
if (!empty($brandInfo['data']) && $brandInfo['code'] == 200) {
|
|
|
$brandId = $brandInfo['data']['id'];
|
|
|
$brandBanner = $brandInfo['data']['brand_banner'];
|
|
|
$brandAbout = $brandInfo['data']['brand_intro'];
|
|
|
} else {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
|
|
|
//品牌ID参数
|
|
|
$condition = array();
|
|
|
$condition['brand'] = $brandId;
|
|
|
|
|
|
//$options参数数组
|
|
|
$options = array();
|
|
|
$options['brandName'] = $domain;
|
|
|
$options['uid'] = $uid;
|
|
|
$options['brandId'] = $brandId;
|
|
|
$options['brandBanner'] = $brandBanner;
|
|
|
$options['brandAbout'] = $brandAbout;
|
|
|
//调用模型获得数据
|
|
|
$data = Product\BrandsModel::getBrandIntro($condition, $options);
|
|
|
|
|
|
$data = array(
|
|
|
//初始化js
|
|
|
'searchListPage' => true,
|
|
|
'list' => $data
|
|
|
);
|
|
|
|
|
|
$this->setWebNavHeader();
|
|
|
//渲染模板
|
|
|
$this->_view->display('list',$data);
|
|
|
}
|
|
|
/**
|
|
|
* 热销排行
|
|
|
*/
|
...
|
...
|
|