|
...
|
...
|
@@ -81,7 +81,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
}
|
|
|
|
arsort($countryArr);
|
|
|
|
$top20 = array_slice($countryArr, 0, 15, true);
|
|
|
|
$arr['country'] = json_encode($top20);
|
|
|
|
$arr['country'] = $top20;
|
|
|
|
return $arr;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -122,7 +122,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->where('updated_date','>=',$startTime)
|
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
->orderByDesc('count')->limit(10)->get()->toArray();
|
|
|
|
$arr['source'] = json_encode($source);
|
|
|
|
$arr['source'] = $source;
|
|
|
|
//访问国家前15
|
|
|
|
$source_country = DB::table('gl_customer_visit')
|
|
|
|
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
|
|
...
|
...
|
@@ -130,7 +130,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->where('updated_date','>=',$startTime)
|
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
->orderBy('ip','desc')->limit(15)->get()->toArray();
|
|
|
|
$arr['source_country'] = json_encode($source_country);
|
|
|
|
$arr['source_country'] = $source_country;
|
|
|
|
//受访界面前15
|
|
|
|
$referrer_url = DB::table('gl_customer_visit_item')
|
|
|
|
->select('url',DB::raw('COUNT(*) as num'))
|
|
...
|
...
|
@@ -139,7 +139,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
->groupBy('url')
|
|
|
|
->limit(15)->get()->toArray();
|
|
|
|
$arr['referrer_url'] = json_encode($referrer_url);
|
|
|
|
$arr['referrer_url'] = $referrer_url;
|
|
|
|
//访问断后
|
|
|
|
$referrer_port = DB::table('gl_customer_visit_item')
|
|
|
|
->select('device_port',DB::raw('COUNT(*) as num'))
|
|
...
|
...
|
@@ -148,7 +148,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
->groupBy('device_port')
|
|
|
|
->limit(15)->get()->toArray();
|
|
|
|
$arr['referrer_port'] = json_encode($referrer_port);
|
|
|
|
$arr['referrer_port'] = $referrer_port;
|
|
|
|
return $arr;
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|