作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

@@ -63,32 +63,32 @@ class OptimizationReportController extends BaseController @@ -63,32 +63,32 @@ class OptimizationReportController extends BaseController
63 $data['rank_chat'] = $this->rank_chat(); 63 $data['rank_chat'] = $this->rank_chat();
64 //关键词排名明细 64 //关键词排名明细
65 $data['keywords_rank_list'] = $this->keywords_rank_list($this->param['project_id'],$projectInfo); 65 $data['keywords_rank_list'] = $this->keywords_rank_list($this->param['project_id'],$projectInfo);
66 - //pv_ip统计  
67 - $data['pv_ip'] = $this->pv_ip($domain_info['domain']);  
68 - //30天统计  
69 - $data['count_30'] = $this->count_30_total();  
70 - //访问国家前10  
71 - $data['access_country_count'] = $this->access_country_count();  
72 - //外链周期分析  
73 - $external_links = ExternalLinks::where('project_id', $this->param['project_id'])->first();  
74 - //SEO数据周期分析图 外链数  
75 - $data['external_links_chat'] = [  
76 - 'labels' => array_keys($external_links['data'] ?? []),  
77 - 'data' => array_values($external_links['data'] ?? []),  
78 - ];  
79 - $indexed_pages = IndexedPages::where('project_id', $this->param['project_id'])->first();  
80 - //SEO数据周期分析图 收录数  
81 - $data['indexed_pages_chat'] = [  
82 - 'labels' => array_keys($indexed_pages['data'] ?? []),  
83 - 'data' => array_values($indexed_pages['data'] ?? []),  
84 - ];  
85 - //月统计报告  
86 - $data['month_count'] = $this->currentMonthCount($domain_info['domain'],$this->param['project_id']);  
87 - //测速  
88 - $speed = Speed::where('project_id', $this->param['project_id'])->first();  
89 - $data['speed'] = $speed['data'] ?? [];  
90 - //询盘  
91 - $data['inquiry'] = $this->getApiList($projectInfo); 66 +// //pv_ip统计
  67 +// $data['pv_ip'] = $this->pv_ip($domain_info['domain']);
  68 +// //30天统计
  69 +// $data['count_30'] = $this->count_30_total();
  70 +// //访问国家前10
  71 +// $data['access_country_count'] = $this->access_country_count();
  72 +// //外链周期分析
  73 +// $external_links = ExternalLinks::where('project_id', $this->param['project_id'])->first();
  74 +// //SEO数据周期分析图 外链数
  75 +// $data['external_links_chat'] = [
  76 +// 'labels' => array_keys($external_links['data'] ?? []),
  77 +// 'data' => array_values($external_links['data'] ?? []),
  78 +// ];
  79 +// $indexed_pages = IndexedPages::where('project_id', $this->param['project_id'])->first();
  80 +// //SEO数据周期分析图 收录数
  81 +// $data['indexed_pages_chat'] = [
  82 +// 'labels' => array_keys($indexed_pages['data'] ?? []),
  83 +// 'data' => array_values($indexed_pages['data'] ?? []),
  84 +// ];
  85 +// //月统计报告
  86 +// $data['month_count'] = $this->currentMonthCount($domain_info['domain'],$this->param['project_id']);
  87 +// //测速
  88 +// $speed = Speed::where('project_id', $this->param['project_id'])->first();
  89 +// $data['speed'] = $speed['data'] ?? [];
  90 +// //询盘
  91 +// $data['inquiry'] = $this->getApiList($projectInfo);
92 DB::disconnect('custom_mysql'); 92 DB::disconnect('custom_mysql');
93 $this->response('success',Code::SUCCESS,$data); 93 $this->response('success',Code::SUCCESS,$data);
94 } 94 }
@@ -204,9 +204,9 @@ class OptimizationReportController extends BaseController @@ -204,9 +204,9 @@ class OptimizationReportController extends BaseController
204 $query = DB::connection('custom_mysql')->table('gl_customer_visit') 204 $query = DB::connection('custom_mysql')->table('gl_customer_visit')
205 ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) 205 ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
206 ->groupBy('country'); 206 ->groupBy('country');
207 - if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){ 207 +
208 $query->where('country','<>','中国'); 208 $query->where('country','<>','中国');
209 - } 209 +
210 $source_country = $query->whereBetween('updated_date', [$startTime,$endTime]) 210 $source_country = $query->whereBetween('updated_date', [$startTime,$endTime])
211 ->orderBy('ip','desc')->limit(15)->get()->toArray(); 211 ->orderBy('ip','desc')->limit(15)->get()->toArray();
212 $arr['source_country'] = $source_country; 212 $arr['source_country'] = $source_country;
@@ -366,14 +366,10 @@ class OptimizationReportController extends BaseController @@ -366,14 +366,10 @@ class OptimizationReportController extends BaseController
366 $result =array(); 366 $result =array();
367 if(!empty($data)){ 367 if(!empty($data)){
368 foreach ($data as $k => $v){ 368 foreach ($data as $k => $v){
369 - if(($this->project['is_record_china_visit'] != 1) && ($v['country'] == '中国')){  
370 - continue;  
371 - }else{  
372 $v['pv'] = (int)$v['pv']; 369 $v['pv'] = (int)$v['pv'];
373 $result[] = $v; 370 $result[] = $v;
374 } 371 }
375 } 372 }
376 - }  
377 return $result; 373 return $result;
378 } 374 }
379 375