作者 张关杰

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

... ... @@ -63,32 +63,32 @@ class OptimizationReportController extends BaseController
$data['rank_chat'] = $this->rank_chat();
//关键词排名明细
$data['keywords_rank_list'] = $this->keywords_rank_list($this->param['project_id'],$projectInfo);
//pv_ip统计
$data['pv_ip'] = $this->pv_ip($domain_info['domain']);
//30天统计
$data['count_30'] = $this->count_30_total();
//访问国家前10
$data['access_country_count'] = $this->access_country_count();
//外链周期分析
$external_links = ExternalLinks::where('project_id', $this->param['project_id'])->first();
//SEO数据周期分析图 外链数
$data['external_links_chat'] = [
'labels' => array_keys($external_links['data'] ?? []),
'data' => array_values($external_links['data'] ?? []),
];
$indexed_pages = IndexedPages::where('project_id', $this->param['project_id'])->first();
//SEO数据周期分析图 收录数
$data['indexed_pages_chat'] = [
'labels' => array_keys($indexed_pages['data'] ?? []),
'data' => array_values($indexed_pages['data'] ?? []),
];
//月统计报告
$data['month_count'] = $this->currentMonthCount($domain_info['domain'],$this->param['project_id']);
//测速
$speed = Speed::where('project_id', $this->param['project_id'])->first();
$data['speed'] = $speed['data'] ?? [];
//询盘
$data['inquiry'] = $this->getApiList($projectInfo);
// //pv_ip统计
// $data['pv_ip'] = $this->pv_ip($domain_info['domain']);
// //30天统计
// $data['count_30'] = $this->count_30_total();
// //访问国家前10
// $data['access_country_count'] = $this->access_country_count();
// //外链周期分析
// $external_links = ExternalLinks::where('project_id', $this->param['project_id'])->first();
// //SEO数据周期分析图 外链数
// $data['external_links_chat'] = [
// 'labels' => array_keys($external_links['data'] ?? []),
// 'data' => array_values($external_links['data'] ?? []),
// ];
// $indexed_pages = IndexedPages::where('project_id', $this->param['project_id'])->first();
// //SEO数据周期分析图 收录数
// $data['indexed_pages_chat'] = [
// 'labels' => array_keys($indexed_pages['data'] ?? []),
// 'data' => array_values($indexed_pages['data'] ?? []),
// ];
// //月统计报告
// $data['month_count'] = $this->currentMonthCount($domain_info['domain'],$this->param['project_id']);
// //测速
// $speed = Speed::where('project_id', $this->param['project_id'])->first();
// $data['speed'] = $speed['data'] ?? [];
// //询盘
// $data['inquiry'] = $this->getApiList($projectInfo);
DB::disconnect('custom_mysql');
$this->response('success',Code::SUCCESS,$data);
}
... ... @@ -204,9 +204,9 @@ class OptimizationReportController extends BaseController
$query = DB::connection('custom_mysql')->table('gl_customer_visit')
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
->groupBy('country');
if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){
$query->where('country','<>','中国');
}
$source_country = $query->whereBetween('updated_date', [$startTime,$endTime])
->orderBy('ip','desc')->limit(15)->get()->toArray();
$arr['source_country'] = $source_country;
... ... @@ -366,14 +366,10 @@ class OptimizationReportController extends BaseController
$result =array();
if(!empty($data)){
foreach ($data as $k => $v){
if(($this->project['is_record_china_visit'] != 1) && ($v['country'] == '中国')){
continue;
}else{
$v['pv'] = (int)$v['pv'];
$result[] = $v;
}
}
}
return $result;
}
... ...