|
...
|
...
|
@@ -102,8 +102,9 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->first();
|
|
|
|
$arr['pv'] = $pv_ip->pv_num;
|
|
|
|
$arr['ip'] = $pv_ip->ip_num;
|
|
|
|
$arr['rate'] = 0;
|
|
|
|
if($arr['ip'] != 0){
|
|
|
|
$arr['rate'] = round(($arr['month_total'] / $arr['ip']) * 10,2);
|
|
|
|
$arr['rate'] = round(($arr['month_total'] / $arr['ip']) * 100,2);
|
|
|
|
}
|
|
|
|
return $arr;
|
|
|
|
}
|
|
...
|
...
|
@@ -134,7 +135,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->orderBy('ip','desc')->limit(15)->get()->toArray();
|
|
|
|
$arr['source_country'] = $source_country;
|
|
|
|
//受访界面前15
|
|
|
|
$referrer_url = DB::table('gl_customer_visit_item')
|
|
|
|
$referrer_url = DB::table('gl_customer_visit')
|
|
|
|
->select('url',DB::raw('COUNT(*) as num'))
|
|
|
|
->orderBy('num','desc')->where(['domain'=>$domain])
|
|
|
|
// ->where('updated_date','>=',$startTime)
|
|
...
|
...
|
@@ -143,7 +144,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->limit(15)->get()->toArray();
|
|
|
|
$arr['referrer_url'] = $referrer_url;
|
|
|
|
//访问断后
|
|
|
|
$referrer_port = DB::table('gl_customer_visit_item')
|
|
|
|
$referrer_port = DB::table('gl_customer_visit')
|
|
|
|
->select('device_port',DB::raw('COUNT(*) as num'))
|
|
|
|
->orderBy('num','desc')->where(['domain'=>$domain])
|
|
|
|
// ->where('updated_date','>=',$startTime)
|
|
...
|
...
|
@@ -166,6 +167,25 @@ class MonthCountLogic extends BaseLogic |
|
|
|
$startTime = date("Y-m-d", strtotime("-9 months", mktime(0, 0, 0)));
|
|
|
|
$ensTime = date('Y-m-d',time());
|
|
|
|
$lists = $count->list(['date'=>['between',[$startTime,$ensTime]],'project_id'=>$this->user['project_id']]);
|
|
|
|
return $this->success($lists);
|
|
|
|
$groupedData = [];
|
|
|
|
foreach ($lists as $k=>$v){
|
|
|
|
$month = date('Y-m', strtotime($v['date']));
|
|
|
|
if(!isset($groupedData[$month])){
|
|
|
|
$groupedData[$month] = [];
|
|
|
|
}
|
|
|
|
$groupedData[$month][] = $v;
|
|
|
|
}
|
|
|
|
return $this->success($groupedData);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取关键字列表
|
|
|
|
* @name :getKeywordLists
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/4 10:19
|
|
|
|
*/
|
|
|
|
public function getKeywordLists(){
|
|
|
|
$optimizeModel = new index();
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|