Authored by Rock Zhang

修复左边栏逛的颜色不跟随的bug,修复品类列表页二级分类中缺少全部一级分类的bug

... ... @@ -20,7 +20,7 @@ class KidsController extends AbstractAction
// 设置网站标题
$this->setTitle('潮童首页');
// 显示侧边栏
$this->setNavSide();
$this->setNavSide('kids');
// 渲染模板并输出
$this->_view->display('index', array(
... ...
... ... @@ -20,7 +20,7 @@ class LifestyleController extends AbstractAction
// 设置网站标题
$this->setTitle('创意生活首页');
// 显示侧边栏
$this->setNavSide();
$this->setNavSide('lifestyle');
// 渲染模板并输出
$this->_view->display('index', array(
... ...
... ... @@ -52,6 +52,17 @@ class ClassModel
$item = array();
$item['name'] = $val['category_name'];
$item['id'] = $val['relation_parameter']['sort'];
// 首先添加一级分类
$item['sub'][] = array(
'name' => '全部'.$item['name'],
'id' => $item['id'],
'url' => Helpers::url('/', array(
'sort' => $item['id'],
'sort_name' => $item['name'], 'list'))
);
$subitem = array();
foreach ($val['sub'] as $value) {
$subitem = array();
$subitem['name'] = $value['category_name'];
... ...
... ... @@ -77,6 +77,16 @@ class SideModel
*/
private static function genLeftNavGuang($guangChoosed = 'all')
{
// 判断逛的背景色
$color = false;
if($guangChoosed === 'girls') {
$color = '#FF88AE';
} else if($guangChoosed === 'kids') {
$color = '#7ad9f9';
} else if($guangChoosed === 'lifestyle') {
$color = '#4f4138';
}
return array(
'textCn' => '逛',
'textEn' => 'TRENDFINDER',
... ... @@ -88,7 +98,7 @@ class SideModel
'textEn' => 'TrendFinder',
'back' => true,
'isSelect' => false,
'bgColor' => ($guangChoosed === 'girls') ? '#FF88AE' : false,
'bgColor' => $color,
),
1 => array(
'textCn' => '查看全部',
... ...