...
|
...
|
@@ -59,7 +59,15 @@ class SideModel |
|
|
|
|
|
// 如果存在子菜单,就输出子菜单
|
|
|
if (isset($value['sub']) && !empty($value['sub'])) {
|
|
|
$subs = array();
|
|
|
$subs = array(
|
|
|
array(
|
|
|
'textCn' => $group[$groupKey]['textCn'],
|
|
|
'textEn' => $group[$groupKey]['textEn'],
|
|
|
'back' => true,
|
|
|
'isSelect' => false,
|
|
|
'bgColor' => self::getSideTopColor($guangChoosed)
|
|
|
)
|
|
|
);
|
|
|
foreach ($value['sub'] as $oneSub) {
|
|
|
$subs[] = self::formatSideItem($oneSub);
|
|
|
}
|
...
|
...
|
@@ -88,6 +96,7 @@ class SideModel |
|
|
|
|
|
// 追加逛的子分类数据
|
|
|
$result[] = self::genLeftNavGuang($guangChoosed);
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -100,14 +109,7 @@ 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';
|
|
|
}
|
|
|
$color = self::getSideTopColor($guangChoosed);
|
|
|
|
|
|
return
|
|
|
array(
|
...
|
...
|
@@ -151,6 +153,26 @@ class SideModel |
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据选择的频道获取逛的背景色
|
|
|
* @param string $guangChoosed 逛默认选中项 "all"表示全部,"boys":只看男生,"girls":只看女生
|
|
|
* @return string color值
|
|
|
*/
|
|
|
private static function getSideTopColor($guangChoosed)
|
|
|
{
|
|
|
// 判断逛的背景色
|
|
|
$color = false;
|
|
|
if ($guangChoosed === 'girls') {
|
|
|
$color = '#FF88AE';
|
|
|
} else if ($guangChoosed === 'kids') {
|
|
|
$color = '#7ad9f9';
|
|
|
} else if ($guangChoosed === 'lifestyle') {
|
|
|
$color = '#4f4138';
|
|
|
}
|
|
|
|
|
|
return $color;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 格式化侧边栏数据
|
...
|
...
|
|