作者 王智

222

@@ -977,27 +977,22 @@ class Index extends Api @@ -977,27 +977,22 @@ class Index extends Api
977 $CL_list1[$k]['id'] = $v['id']; 977 $CL_list1[$k]['id'] = $v['id'];
978 $CL_list[$k]['fid'] = $v['id']; 978 $CL_list[$k]['fid'] = $v['id'];
979 $CL_list[$k]['title'] = $v['class']; 979 $CL_list[$k]['title'] = $v['class'];
980 - foreach ($CL_list1 as $k1 => $v1) {  
981 - $second_arr2[0] = Db::name('class_con')->where(['class_ids' => $v1['id']])->select();  
982 - if (!empty($second_arr2[0])) {  
983 - echo '1';  
984 -// $second_arr = $second_arr2[0];  
985 - print_r($second_arr2[0]);  
986 -// foreach ($second_arr as $k1 => $v1) {  
987 -// $second_arr3[$k]['xid'] = $v1['id'];  
988 -// $second_arr3[$k]['title'] = $v1['class_con'];  
989 -// }  
990 -// foreach ($second_arr3 as $k3 => $v3) {  
991 -// $CL_list[$k1]['IsList'] = $second_arr3;  
992 -// } 980 + }
  981 + foreach ($CL_list1 as $k => $v) {
  982 + $second_arr2[$k] = Db::name('class_con')->where(['class_ids' => $v['id']])->select();
  983 + if (!empty($second_arr2[$k])) {
  984 + $second_arr[$k] = $second_arr2[$k];
  985 + foreach ($second_arr[$k] as $k3 => $v3) {
  986 + $second_arr3[$k3]['xid'] = $v3['id'];
  987 + $second_arr3[$k3]['title'] = $v3['class_con'];
  988 + }
  989 + foreach ($second_arr3 as $k2 => $v2) {
  990 + $CL_list[$k]['IsList'] = $second_arr3;
993 } 991 }
994 - }  
995 - if ($k == 2) {  
996 - break;  
997 } 992 }
998 } 993 }
999 994
1000 -// print_r($second_arr); 995 + print_r($CL_list);
1001 die; 996 die;
1002 997
1003 foreach ($logo as $k => $v) { 998 foreach ($logo as $k => $v) {