Authored by yyq

Merge branch 'hotfix/cate'

... ... @@ -46,8 +46,9 @@ class ClassModel
$genderArr = array('boy' => '1,3', 'girl' => '2,3', 'kids' => '1,2,3', 'lifestyle' => '1,2,3');
$oneClass = array();
$item = array();
foreach ($data['data'] as $k => $v) {
$oneClass = array('name' => ucfirst(rtrim($k, 's')), 'ca' => array());
foreach ($genderArr as $gk => $gv) {
$v = $data['data'][$gk];
$oneClass = array('name' => ucfirst(rtrim($gk, 's')), 'ca' => array());
foreach ($v as $val) {
$item = array();
... ... @@ -59,7 +60,7 @@ class ClassModel
$item['url'] = Helpers::url('/', array(
'sort' => $item['id'],
'sort_name' => $item['name'],
'gender' => $genderArr[$k]), 'list');
'gender' => $gv), 'list');
$oneClass['ca'][] = $item;
continue;
}
... ... @@ -71,7 +72,7 @@ class ClassModel
'url' => Helpers::url('/', array(
'sort' => $item['id'],
'sort_name' => $item['name'],
'gender' => $genderArr[$k]), 'list')
'gender' => $gv), 'list')
);
$subitem = array();
... ... @@ -82,7 +83,7 @@ class ClassModel
$subitem['url'] = Helpers::url('/', array(
'sort' => $value['relation_parameter']['sort'],
'sort_name' => $value['category_name'],
'gender' => $genderArr[$k]
'gender' => $gv
), 'list');
$item['sub'][] = $subitem;
}
... ...