正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
| @@ -81,7 +81,7 @@ class MonthCountLogic extends BaseLogic | @@ -81,7 +81,7 @@ class MonthCountLogic extends BaseLogic | ||
| 81 | } | 81 | } |
| 82 | arsort($countryArr); | 82 | arsort($countryArr); |
| 83 | $top20 = array_slice($countryArr, 0, 15, true); | 83 | $top20 = array_slice($countryArr, 0, 15, true); |
| 84 | - $arr['country'] = json_encode($top20); | 84 | + $arr['country'] = $top20; |
| 85 | return $arr; | 85 | return $arr; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| @@ -122,7 +122,7 @@ class MonthCountLogic extends BaseLogic | @@ -122,7 +122,7 @@ class MonthCountLogic extends BaseLogic | ||
| 122 | ->where('updated_date','>=',$startTime) | 122 | ->where('updated_date','>=',$startTime) |
| 123 | ->where('updated_date','<=',$endTime) | 123 | ->where('updated_date','<=',$endTime) |
| 124 | ->orderByDesc('count')->limit(10)->get()->toArray(); | 124 | ->orderByDesc('count')->limit(10)->get()->toArray(); |
| 125 | - $arr['source'] = json_encode($source); | 125 | + $arr['source'] = $source; |
| 126 | //访问国家前15 | 126 | //访问国家前15 |
| 127 | $source_country = DB::table('gl_customer_visit') | 127 | $source_country = DB::table('gl_customer_visit') |
| 128 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | 128 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) |
| @@ -130,7 +130,7 @@ class MonthCountLogic extends BaseLogic | @@ -130,7 +130,7 @@ class MonthCountLogic extends BaseLogic | ||
| 130 | ->where('updated_date','>=',$startTime) | 130 | ->where('updated_date','>=',$startTime) |
| 131 | ->where('updated_date','<=',$endTime) | 131 | ->where('updated_date','<=',$endTime) |
| 132 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); | 132 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); |
| 133 | - $arr['source_country'] = json_encode($source_country); | 133 | + $arr['source_country'] = $source_country; |
| 134 | //受访界面前15 | 134 | //受访界面前15 |
| 135 | $referrer_url = DB::table('gl_customer_visit_item') | 135 | $referrer_url = DB::table('gl_customer_visit_item') |
| 136 | ->select('url',DB::raw('COUNT(*) as num')) | 136 | ->select('url',DB::raw('COUNT(*) as num')) |
| @@ -139,7 +139,7 @@ class MonthCountLogic extends BaseLogic | @@ -139,7 +139,7 @@ class MonthCountLogic extends BaseLogic | ||
| 139 | ->where('updated_date','<=',$endTime) | 139 | ->where('updated_date','<=',$endTime) |
| 140 | ->groupBy('url') | 140 | ->groupBy('url') |
| 141 | ->limit(15)->get()->toArray(); | 141 | ->limit(15)->get()->toArray(); |
| 142 | - $arr['referrer_url'] = json_encode($referrer_url); | 142 | + $arr['referrer_url'] = $referrer_url; |
| 143 | //访问断后 | 143 | //访问断后 |
| 144 | $referrer_port = DB::table('gl_customer_visit_item') | 144 | $referrer_port = DB::table('gl_customer_visit_item') |
| 145 | ->select('device_port',DB::raw('COUNT(*) as num')) | 145 | ->select('device_port',DB::raw('COUNT(*) as num')) |
| @@ -148,7 +148,7 @@ class MonthCountLogic extends BaseLogic | @@ -148,7 +148,7 @@ class MonthCountLogic extends BaseLogic | ||
| 148 | ->where('updated_date','<=',$endTime) | 148 | ->where('updated_date','<=',$endTime) |
| 149 | ->groupBy('device_port') | 149 | ->groupBy('device_port') |
| 150 | ->limit(15)->get()->toArray(); | 150 | ->limit(15)->get()->toArray(); |
| 151 | - $arr['referrer_port'] = json_encode($referrer_port); | 151 | + $arr['referrer_port'] = $referrer_port; |
| 152 | return $arr; | 152 | return $arr; |
| 153 | } | 153 | } |
| 154 | 154 |
-
请 注册 或 登录 后发表评论