Authored by whb

导航修改

@@ -67,6 +67,7 @@ class HomeModel @@ -67,6 +67,7 @@ class HomeModel
67 $menu = Cache::get($key); 67 $menu = Cache::get($key);
68 if(empty($menu)) { 68 if(empty($menu)) {
69 $item = array(); 69 $item = array();
  70 + $index_main = 0;
70 foreach ($data['data'] as $val) { 71 foreach ($data['data'] as $val) {
71 $item = array( 72 $item = array(
72 'name_cn' => $val['sort_name'], // 父级 73 'name_cn' => $val['sort_name'], // 父级
@@ -74,7 +75,7 @@ class HomeModel @@ -74,7 +75,7 @@ class HomeModel
74 'link' => $val['sort_url'], 75 'link' => $val['sort_url'],
75 'icon' => $val['sort_ico'], 76 'icon' => $val['sort_ico'],
76 'classname' => str_replace(' ', '', strtolower($val['sort_name_en'])) == $channel ? $channel : '', 77 'classname' => str_replace(' ', '', strtolower($val['sort_name_en'])) == $channel ? $channel : '',
77 - 'index_main' => 0, 78 + 'index_main' => $index_main++,
78 'is_hot' => $val['is_hot'] == 'Y' ? true : false, 79 'is_hot' => $val['is_hot'] == 'Y' ? true : false,
79 'is_new' => $val['is_new'] == 'Y' ? true : false, 80 'is_new' => $val['is_new'] == 'Y' ? true : false,
80 // 'subnav' => array() 81 // 'subnav' => array()