作者 lyh

gx

@@ -83,7 +83,7 @@ class OptimizationReportController extends BaseController @@ -83,7 +83,7 @@ class OptimizationReportController extends BaseController
83 'data' => array_values($indexed_pages['data'] ?? []), 83 'data' => array_values($indexed_pages['data'] ?? []),
84 ]; 84 ];
85 //月统计报告 85 //月统计报告
86 - $data['month_count'] = $this->currentMonthCount(); 86 + $data['month_count'] = $this->currentMonthCount($domain_info['domain'],$this->param['project_id']);
87 //测速 87 //测速
88 $speed = Speed::where('project_id', $this->param['project_id'])->first(); 88 $speed = Speed::where('project_id', $this->param['project_id'])->first();
89 $data['speed'] = $speed['data'] ?? []; 89 $data['speed'] = $speed['data'] ?? [];
@@ -100,15 +100,15 @@ class OptimizationReportController extends BaseController @@ -100,15 +100,15 @@ class OptimizationReportController extends BaseController
100 * @method :post 100 * @method :post
101 * @time :2023/7/3 9:55 101 * @time :2023/7/3 9:55
102 */ 102 */
103 - public function currentMonthCount(){ 103 + public function currentMonthCount($domain,$project_id){
104 // 获取当前月的开始时间 104 // 获取当前月的开始时间
105 $startTime = date('Y-m-01 00:00:00', strtotime('2024-01')); 105 $startTime = date('Y-m-01 00:00:00', strtotime('2024-01'));
106 // 获取当前月的结束时间 106 // 获取当前月的结束时间
107 $endTime = date('Y-m-t 23:59:59', strtotime('2024-01')); 107 $endTime = date('Y-m-t 23:59:59', strtotime('2024-01'));
108 $arr = []; 108 $arr = [];
109 - $arr = $this->inquiryCount($arr,$startTime,$endTime,$this->user['domain']);  
110 - $arr = $this->flowCount($arr,$startTime,$endTime,$this->user['project_id']);  
111 - $arr = $this->sourceCount($arr,$startTime,$endTime,$this->user['domain']); 109 + $arr = $this->inquiryCount($arr,$startTime,$endTime,$domain);
  110 + $arr = $this->flowCount($arr,$startTime,$endTime,$project_id);
  111 + $arr = $this->sourceCount($arr,$startTime,$endTime,$domain);
112 $arr['month'] = date('Y-m',time()); 112 $arr['month'] = date('Y-m',time());
113 return $arr; 113 return $arr;
114 } 114 }