|
@@ -4,6 +4,7 @@ namespace App\Http\Logic\Bside\HomeCount; |
|
@@ -4,6 +4,7 @@ namespace App\Http\Logic\Bside\HomeCount; |
|
4
|
|
4
|
|
|
5
|
|
5
|
|
|
6
|
use App\Http\Logic\Bside\BaseLogic;
|
6
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
7
|
+use App\Models\EnterpriseService\EnterpriseService as EnterpriseServiceModel;
|
|
7
|
use App\Models\HomeCount\Count;
|
8
|
use App\Models\HomeCount\Count;
|
|
8
|
use App\Models\RankData\RankData as RankDataModel;
|
9
|
use App\Models\RankData\RankData as RankDataModel;
|
|
9
|
use Carbon\Carbon;
|
10
|
use Carbon\Carbon;
|
|
@@ -57,13 +58,13 @@ class CountLogic extends BaseLogic |
|
@@ -57,13 +58,13 @@ class CountLogic extends BaseLogic |
|
57
|
* @method :post
|
58
|
* @method :post
|
|
58
|
* @time :2023/5/24 13:33
|
59
|
* @time :2023/5/24 13:33
|
|
59
|
*/
|
60
|
*/
|
|
60
|
- public function total_count($inquiry_num){
|
61
|
+ public function total_count($inquiry_num = ''){
|
|
61
|
$pv = DB::table('gl_customer_visit_item')->where(['domain'=>$this->project['deploy_build']['test_domain']])->count();
|
62
|
$pv = DB::table('gl_customer_visit_item')->where(['domain'=>$this->project['deploy_build']['test_domain']])->count();
|
|
62
|
$ip = DB::table('gl_customer_visit')->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
|
$data = [
|
64
|
$data = [
|
|
64
|
'total_pv'=>$pv,
|
65
|
'total_pv'=>$pv,
|
|
65
|
'total_ip'=>$ip,
|
66
|
'total_ip'=>$ip,
|
|
66
|
- 'conversion_rate' => ($inquiry_num / $ip) * 100,
|
67
|
+ 'conversion_rate' => isset($inquiry_num) ? ($inquiry_num / $ip) * 100 : 0,
|
|
67
|
];
|
68
|
];
|
|
68
|
return $this->success($data);
|
69
|
return $this->success($data);
|
|
69
|
}
|
70
|
}
|
|
@@ -174,4 +175,16 @@ class CountLogic extends BaseLogic |
|
@@ -174,4 +175,16 @@ class CountLogic extends BaseLogic |
|
174
|
}
|
175
|
}
|
|
175
|
return $this->success($data);
|
176
|
return $this->success($data);
|
|
176
|
}
|
177
|
}
|
|
|
|
178
|
+
|
|
|
|
179
|
+ /**
|
|
|
|
180
|
+ * @name :(售后服务中心)enterprise_service
|
|
|
|
181
|
+ * @author :lyh
|
|
|
|
182
|
+ * @method :post
|
|
|
|
183
|
+ * @time :2023/5/25 10:22
|
|
|
|
184
|
+ */
|
|
|
|
185
|
+ public function enterprise_service(){
|
|
|
|
186
|
+ $enterpriseServiceModel = new EnterpriseServiceModel();
|
|
|
|
187
|
+ $info = $enterpriseServiceModel->read(['status'=>0]);
|
|
|
|
188
|
+ return $this->success($info);
|
|
|
|
189
|
+ }
|
|
177
|
} |
190
|
} |