...
|
...
|
@@ -54,7 +54,17 @@ class ClassModel |
|
|
$item['name'] = $val['category_name'];
|
|
|
$item['id'] = $val['relation_parameter']['sort'];
|
|
|
|
|
|
// 首先添加一级分类
|
|
|
if (!isset($val['sub'])) {
|
|
|
//ficx-bug根节点没有子分类,直接跳转相应品类页面
|
|
|
$item['url'] = Helpers::url('/', array(
|
|
|
'sort' => $item['id'],
|
|
|
'sort_name' => $item['name'],
|
|
|
'gender' => $genderArr[$k]), 'list');
|
|
|
$oneClass['ca'][] = $item;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
//有子分类的,首先添加一级分类
|
|
|
$item['sub'][] = array(
|
|
|
'name' => '全部' . $item['name'],
|
|
|
'id' => $item['id'],
|
...
|
...
|
@@ -64,10 +74,6 @@ class ClassModel |
|
|
'gender' => $genderArr[$k]), 'list')
|
|
|
);
|
|
|
|
|
|
if(!isset($val['sub'])) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
$subitem = array();
|
|
|
foreach ($val['sub'] as $value) {
|
|
|
$subitem = array();
|
...
|
...
|
@@ -86,7 +92,8 @@ class ClassModel |
|
|
|
|
|
$result[] = $oneClass;
|
|
|
}
|
|
|
} while (false);
|
|
|
}
|
|
|
while (false);
|
|
|
|
|
|
if (USE_CACHE) {
|
|
|
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
|
...
|
...
|
|