正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -164,8 +164,8 @@ class CountLogic extends BaseLogic | @@ -164,8 +164,8 @@ class CountLogic extends BaseLogic | ||
| 164 | $data = $customerVisitModel->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | 164 | $data = $customerVisitModel->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) |
| 165 | ->groupBy('country') | 165 | ->groupBy('country') |
| 166 | ->orderBy('ip','desc')->limit(11)->get()->toArray(); | 166 | ->orderBy('ip','desc')->limit(11)->get()->toArray(); |
| 167 | + $result =array(); | ||
| 167 | if(!empty($data)){ | 168 | if(!empty($data)){ |
| 168 | - $result =array(); | ||
| 169 | foreach ($data as $k => $v){ | 169 | foreach ($data as $k => $v){ |
| 170 | if(($this->project['is_record_china_visit'] != 1) && ($v['country'] == '中国')){ | 170 | if(($this->project['is_record_china_visit'] != 1) && ($v['country'] == '中国')){ |
| 171 | continue; | 171 | continue; |
| @@ -175,7 +175,7 @@ class CountLogic extends BaseLogic | @@ -175,7 +175,7 @@ class CountLogic extends BaseLogic | ||
| 175 | } | 175 | } |
| 176 | } | 176 | } |
| 177 | } | 177 | } |
| 178 | - return $this->success($data); | 178 | + return $this->success($result); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | /** | 181 | /** |
-
请 注册 或 登录 后发表评论