...
|
...
|
@@ -85,18 +85,23 @@ class IndexController extends AbstractAction |
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
|
|
|
/* 通过品牌域名找到对应的品牌ID */
|
|
|
$domainList = Product\ListModel::getAllBrandDomains();
|
|
|
$brandIds = array_keys($domainList, $domain);
|
|
|
// 存标题信息
|
|
|
$title = '';
|
|
|
$brandLogo = Product\ListModel::getBrandLogoByDomain($domain, $title);
|
|
|
$brandId = 0;
|
|
|
if (isset($brandIds[0])) {
|
|
|
$brandId = $brandIds[0];
|
|
|
}
|
|
|
|
|
|
if ($brandLogo && isset($brandLogo['id'])) {
|
|
|
$brandId = $brandLogo['id'];
|
|
|
}
|
|
|
|
|
|
/* 通过品牌域名找到对应的品牌ID */
|
|
|
// $domainList = Product\ListModel::getAllBrandDomains();
|
|
|
// $brandIds = array_keys($domainList, $domain);
|
|
|
// $brandId = 0;
|
|
|
// if (isset($brandIds[0])) {
|
|
|
// $brandId = $brandIds[0];
|
|
|
// }
|
|
|
// 当前的登录用户UID
|
|
|
$uid = $this->getUid();
|
|
|
// 存标题信息
|
|
|
$title = '';
|
|
|
|
|
|
/* 搜索框相关 */
|
|
|
$from = $this->get('from');
|
...
|
...
|
@@ -114,7 +119,7 @@ class IndexController extends AbstractAction |
|
|
'gender' => FILTER_DEFAULT,
|
|
|
'p_d' => FILTER_DEFAULT,), false);
|
|
|
$condition['brand'] = $brandId;
|
|
|
|
|
|
|
|
|
if ($brandId === 0) {
|
|
|
$condition['query'] = $domain;
|
|
|
}
|
...
|
...
|
@@ -131,12 +136,13 @@ class IndexController extends AbstractAction |
|
|
// 从搜索页过来的,显示搜索框, 和进入品牌引导信息
|
|
|
if ($from === 'search') {
|
|
|
$data['goodList'] = array();
|
|
|
$data['goodList']['brandWay'] = \Product\ListModel::getBrandLogoByIds($brandId, $title);
|
|
|
//$data['goodList']['brandWay'] = \Product\ListModel::getBrandLogoByIds($brandId, $title);
|
|
|
$data['goodList']['brandWay'] = $brandLogo;
|
|
|
$data['goodList']['search']['default'] = $query;
|
|
|
$data['goodList']['search']['url'] = Helpers::url('', null, 'search');
|
|
|
}
|
|
|
// 品牌一览过来的展示品牌介绍和LOGO
|
|
|
else {
|
|
|
elseif ($brandId !== 0) {
|
|
|
$data['brandHome'] = \Product\ListModel::getBrandIntro($brandId, $uid, $title);
|
|
|
$data['goodList'] = array();
|
|
|
}
|
...
|
...
|
|