biz
beforeorder beforeorder beforeorder
This commit is contained in:
@@ -146,18 +146,17 @@ class Stic extends Admin
|
||||
$biz_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$biz_subscribe_count = $this->mdSytActivityKpiData->count($where); //订阅数据
|
||||
if ($this->a_id == 11) {
|
||||
$where['kpi'] = 'order';
|
||||
} else {
|
||||
$where['kpi'] = 'beforeOrder';
|
||||
}
|
||||
$where['kpi'] = 'order';
|
||||
$order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
|
||||
$biz = [
|
||||
['title' => '访问用户', 'num' => "{$biz_browse_count}人", 'url' => "/h5/market/sylive2/stic/users?type=biz&type_id={$group_user['bizId']}&kpi=browse"],
|
||||
];
|
||||
if ($this->a_id == 11) {
|
||||
$biz[] = ['title' => '留资用户', 'num' => "{$order_count}人", 'url' => "/h5/market/sylive2/stic/users?type=biz&type_id={$group_user['bizId']}&kpi=subscribe"];
|
||||
$biz[] = ['title' => '留资率', 'num' => $order_count ? round($order_count / $biz_browse_count * 100, 2) . "%" : 0];
|
||||
$where['kpi'] = 'beforeOrder';
|
||||
$before_order_count = $this->mdSytActivityKpiData->count($where); //留资数据
|
||||
$biz[] = ['title' => '留资用户', 'num' => "{$before_order_count}人", 'url' => "/h5/market/sylive2/stic/users?type=biz&type_id={$group_user['bizId']}&kpi=beforeOrder"];
|
||||
$biz[] = ['title' => '留资率', 'num' => $before_order_count ? round($before_order_count / $biz_browse_count * 100, 2) . "%" : 0];
|
||||
} else {
|
||||
$biz[] = ['title' => '预约用户', 'num' => "{$biz_subscribe_count}人", 'url' => "/h5/market/sylive2/stic/users?type=biz&type_id={$group_user['bizId']}&kpi=subscribe"];
|
||||
$biz[] = ['title' => '预约率', 'num' => $biz_browse_count ? round($biz_subscribe_count / $biz_browse_count * 100, 2) . "%" : 0];
|
||||
@@ -363,7 +362,7 @@ class Stic extends Admin
|
||||
public function users()
|
||||
{
|
||||
$map_kpi_name = [
|
||||
'browse' => '访问用户', 'subscribe' => '预约用户', 'order' => '下单数', 'watch' => '观看用户'
|
||||
'browse' => '访问用户', 'subscribe' => '预约用户', 'order' => '下单数', 'watch' => '观看用户','beforeOrder' => '留资客户'
|
||||
];
|
||||
$params = $this->input->get();
|
||||
$row = $this->market_sylive_activity_model->get(['activityId' => $this->a_id]);
|
||||
|
||||
Reference in New Issue
Block a user