Showing
1 changed file
with
5 additions
and
2 deletions
@@ -43,6 +43,7 @@ class ClassModel | @@ -43,6 +43,7 @@ class ClassModel | ||
43 | break; | 43 | break; |
44 | } | 44 | } |
45 | 45 | ||
46 | + $genderArr = array('boy' => '1,3', 'girl' => '2,3', 'kids' => '1,2,3', 'lifestyle' => '1,2,3'); | ||
46 | $oneClass = array(); | 47 | $oneClass = array(); |
47 | $item = array(); | 48 | $item = array(); |
48 | foreach ($data['data'] as $k => $v) { | 49 | foreach ($data['data'] as $k => $v) { |
@@ -59,7 +60,8 @@ class ClassModel | @@ -59,7 +60,8 @@ class ClassModel | ||
59 | 'id' => $item['id'], | 60 | 'id' => $item['id'], |
60 | 'url' => Helpers::url('/', array( | 61 | 'url' => Helpers::url('/', array( |
61 | 'sort' => $item['id'], | 62 | 'sort' => $item['id'], |
62 | - 'sort_name' => $item['name']), 'list') | 63 | + 'sort_name' => $item['name'], |
64 | + 'gender' => $genderArr[$k]), 'list') | ||
63 | ); | 65 | ); |
64 | 66 | ||
65 | $subitem = array(); | 67 | $subitem = array(); |
@@ -69,7 +71,8 @@ class ClassModel | @@ -69,7 +71,8 @@ class ClassModel | ||
69 | $subitem['id'] = $value['relation_parameter']['sort']; | 71 | $subitem['id'] = $value['relation_parameter']['sort']; |
70 | $subitem['url'] = Helpers::url('/', array( | 72 | $subitem['url'] = Helpers::url('/', array( |
71 | 'sort' => $value['relation_parameter']['sort'], | 73 | 'sort' => $value['relation_parameter']['sort'], |
72 | - 'sort_name' => $value['category_name'] | 74 | + 'sort_name' => $value['category_name'], |
75 | + 'gender' => $genderArr[$k] | ||
73 | ), 'list'); | 76 | ), 'list'); |
74 | $item['sub'][] = $subitem; | 77 | $item['sub'][] = $subitem; |
75 | } | 78 | } |
-
Please register or login to post a comment