正在显示
2 个修改的文件
包含
6 行增加
和
8 行删除
| @@ -147,13 +147,11 @@ class ComController extends BaseController | @@ -147,13 +147,11 @@ class ComController extends BaseController | ||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | public function ceshi(){ | 149 | public function ceshi(){ |
| 150 | - $referrer_port = DB::table('gl_customer_visit_item') | ||
| 151 | - ->select('device_port',DB::raw('COUNT(*) as num')) | ||
| 152 | - ->orderBy('num','desc')->where(['domain'=>'http://lxl.petuu.shop/']) | ||
| 153 | - ->groupBy('device_port') | ||
| 154 | - ->limit(15)->get()->toArray(); | ||
| 155 | - $arr['referrer_port'] = json_encode($referrer_port); | ||
| 156 | - return $arr['referrer_port']; | 150 | + $data = DB::table('gl_customer_visit') |
| 151 | + ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | ||
| 152 | + ->groupBy('country')->where(['domain'=>$this->project['deploy_build']['test_domain']]) | ||
| 153 | + ->orderBy('ip','desc')->limit(10)->get()->toArray(); | ||
| 154 | + return $data; | ||
| 157 | } | 155 | } |
| 158 | 156 | ||
| 159 | /** | 157 | /** |
| @@ -153,7 +153,7 @@ class CountLogic extends BaseLogic | @@ -153,7 +153,7 @@ class CountLogic extends BaseLogic | ||
| 153 | $data = DB::table('gl_customer_visit') | 153 | $data = DB::table('gl_customer_visit') |
| 154 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | 154 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) |
| 155 | ->groupBy('country')->where(['domain'=>$this->project['deploy_build']['test_domain']]) | 155 | ->groupBy('country')->where(['domain'=>$this->project['deploy_build']['test_domain']]) |
| 156 | - ->orderBy('ip','desc')->limit(20)->get()->toArray(); | 156 | + ->orderBy('ip','desc')->limit(10)->get()->toArray(); |
| 157 | if(!empty($data)){ | 157 | if(!empty($data)){ |
| 158 | $data = object_to_array($data); | 158 | $data = object_to_array($data); |
| 159 | foreach ($data as $k => $v){ | 159 | foreach ($data as $k => $v){ |
-
请 注册 或 登录 后发表评论