作者 王智

修改

@@ -398,11 +398,14 @@ class Question extends Api @@ -398,11 +398,14 @@ class Question extends Api
398 $Month[$k]['P'] = round((array_sum(array_column($v, 'P'))) / count($v), 1); 398 $Month[$k]['P'] = round((array_sum(array_column($v, 'P'))) / count($v), 1);
399 $Month[$k]['K'] = round((array_sum(array_column($v, 'K'))) / count($v), 1); 399 $Month[$k]['K'] = round((array_sum(array_column($v, 'K'))) / count($v), 1);
400 } 400 }
401 - dump($Day);  
402 - dump($Month);  
403 } else { 401 } else {
404 $Day = []; 402 $Day = [];
405 $Month = []; 403 $Month = [];
406 } 404 }
  405 + $data = [
  406 + 'Day' => $Day,
  407 + 'Month' => $Month
  408 + ];
  409 + $this->success('成功', $data);
407 } 410 }
408 } 411 }