作者 王智

222

@@ -978,19 +978,16 @@ class Index extends Api @@ -978,19 +978,16 @@ class Index extends Api
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) { 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 - $second_arr[0] = $second_arr2[0]; 981 + $second_arr2[$k1] = Db::name('class_con')->where(['class_ids' => $v1['id']])->select();
  982 + if (!empty($second_arr2[$k1])) {
  983 + $second_arr = $second_arr2[$k1];
984 } 984 }
985 - foreach ($second_arr[0] as $k3 => $v3) { 985 + foreach ($second_arr as $k3 => $v3) {
986 $second_arr3[$k3]['xid'] = $v3['id']; 986 $second_arr3[$k3]['xid'] = $v3['id'];
987 $second_arr3[$k3]['title'] = $v3['class_con']; 987 $second_arr3[$k3]['title'] = $v3['class_con'];
988 } 988 }
989 -// foreach ($second_arr3 as $k2 => $v2) {  
990 -// $CL_list[$k1]['IsList'] = $second_arr3;  
991 -// }  
992 - if ($k == 1) {  
993 - break; 989 + foreach ($second_arr3 as $k2 => $v2) {
  990 + $CL_list[$k1]['IsList'] = $second_arr3;
994 } 991 }
995 } 992 }
996 } 993 }