正在显示
1 个修改的文件
包含
5 行增加
和
4 行删除
| @@ -48,6 +48,7 @@ class CountLogic extends BaseLogic | @@ -48,6 +48,7 @@ class CountLogic extends BaseLogic | ||
| 48 | 'company'=>$this->project['company'], | 48 | 'company'=>$this->project['company'], |
| 49 | 'scheme'=>$this->project['deploy_build']['plan'], | 49 | 'scheme'=>$this->project['deploy_build']['plan'], |
| 50 | 'service_duration'=>$this->project['deploy_build']['service_duration'], | 50 | 'service_duration'=>$this->project['deploy_build']['service_duration'], |
| 51 | + 'domain'=>$this->project['deploy_build']['test_domain'] | ||
| 51 | ]; | 52 | ]; |
| 52 | return $this->success($data); | 53 | return $this->success($data); |
| 53 | } | 54 | } |
| @@ -59,8 +60,8 @@ class CountLogic extends BaseLogic | @@ -59,8 +60,8 @@ class CountLogic extends BaseLogic | ||
| 59 | * @time :2023/5/24 13:33 | 60 | * @time :2023/5/24 13:33 |
| 60 | */ | 61 | */ |
| 61 | public function total_count($inquiry_num = ''){ | 62 | public function total_count($inquiry_num = ''){ |
| 62 | - $pv = DB::table('gl_customer_visit_item')->where(['domain'=>$this->project['deploy_build']['test_domain']])->count(); | ||
| 63 | - $ip = DB::table('gl_customer_visit')->where(['domain'=>$this->project['deploy_build']['test_domain']])->count(); | 63 | + $pv = DB::table('gl_customer_visit_item')->where(['domain'=>$this->user['domain']])->count(); |
| 64 | + $ip = DB::table('gl_customer_visit')->where(['domain'=>$this->user['domain']])->count(); | ||
| 64 | $data = [ | 65 | $data = [ |
| 65 | 'total_pv'=>$pv, | 66 | 'total_pv'=>$pv, |
| 66 | 'total_ip'=>$ip, | 67 | 'total_ip'=>$ip, |
| @@ -131,7 +132,7 @@ class CountLogic extends BaseLogic | @@ -131,7 +132,7 @@ class CountLogic extends BaseLogic | ||
| 131 | public function referrer_count(){ | 132 | public function referrer_count(){ |
| 132 | $data = DB::table('gl_customer_visit') | 133 | $data = DB::table('gl_customer_visit') |
| 133 | ->select('referrer_url', DB::raw('COUNT(*) as count')) | 134 | ->select('referrer_url', DB::raw('COUNT(*) as count')) |
| 134 | - ->groupBy('referrer_url')->where(['domain'=>'http://lxl.petuu.shop/']) | 135 | + ->groupBy('referrer_url')->where(['domain'=>$this->user['domain']]) |
| 135 | ->orderByDesc('count')->limit(8)->get()->toArray(); | 136 | ->orderByDesc('count')->limit(8)->get()->toArray(); |
| 136 | $total = DB::table('gl_customer_visit')->count(); | 137 | $total = DB::table('gl_customer_visit')->count(); |
| 137 | if(!empty($data)){ | 138 | if(!empty($data)){ |
| @@ -152,7 +153,7 @@ class CountLogic extends BaseLogic | @@ -152,7 +153,7 @@ class CountLogic extends BaseLogic | ||
| 152 | public function access_country_count(){ | 153 | public function access_country_count(){ |
| 153 | $data = DB::table('gl_customer_visit') | 154 | $data = DB::table('gl_customer_visit') |
| 154 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | 155 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) |
| 155 | - ->groupBy('country')->where(['domain'=>'http://lxl.petuu.shop/']) | 156 | + ->groupBy('country')->where(['domain'=>$this->user['domain']]) |
| 156 | ->orderBy('ip','desc')->limit(10)->get()->toArray(); | 157 | ->orderBy('ip','desc')->limit(10)->get()->toArray(); |
| 157 | if(!empty($data)){ | 158 | if(!empty($data)){ |
| 158 | $data = object_to_array($data); | 159 | $data = object_to_array($data); |
-
请 注册 或 登录 后发表评论