edit-sylive-static_hidden_view
This commit is contained in:
@@ -45,6 +45,38 @@ class Sylive_entity{
|
||||
return $level;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $organizationId
|
||||
* @param $group_id
|
||||
* @return void
|
||||
*/
|
||||
public function get_biz_id($organizationId,$group_id){
|
||||
if($group_id==3){ //顾问
|
||||
$org_row = $this->ci->market_sylive_organization_model->get(['organizationId'=>$organizationId],'parentId');
|
||||
$biz_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
}elseif($group_id==2){ //店长
|
||||
$biz_id = $organizationId;
|
||||
}else{
|
||||
$biz_id = 0;
|
||||
}
|
||||
return $biz_id;
|
||||
}
|
||||
/**
|
||||
* @param $organizationId
|
||||
* @param $group_id
|
||||
* @return int|mixed
|
||||
*/
|
||||
public function get_area_id($organizationId,$group_id){
|
||||
if($group_id==2){ //店长
|
||||
$org_row = $this->ci->market_sylive_organization_model->get(['organizationId'=>$organizationId],'parentId');
|
||||
$area_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
}elseif($group_id==1){
|
||||
$area_id = $organizationId;
|
||||
}else{
|
||||
$area_id = 0;
|
||||
}
|
||||
return $area_id;
|
||||
}
|
||||
/**
|
||||
* 判断活动是否有权限
|
||||
* @param $organizationId
|
||||
|
||||
@@ -281,18 +281,13 @@ class Biz extends Admin {
|
||||
$skey = $this->myencryption->base64url_encode("a_id=" . $val['activityId']);
|
||||
$pay_status = 1;
|
||||
$url = '/h5/market/sylive/act?skey='.$skey;
|
||||
$stat_url = '/h5/market/sylive/stic?skey='.$skey;
|
||||
$stat_url = "/h5/market/sylive/stic?skey={$skey}&biz_id={$biz_id}";
|
||||
if($way==2 && in_array($this->group_id,[2,3])){
|
||||
$where = [
|
||||
'activityId' => $val['activityId'],
|
||||
'status' => 1
|
||||
];
|
||||
if($this->group_id==3){ //顾问
|
||||
$biz_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$biz_id = $biz_row['parentId'];
|
||||
}else{
|
||||
$biz_id = $this->session['org_id'];
|
||||
}
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$where['bizId'] = $biz_id;
|
||||
$pay_row = $this->mdSytActivityOrders->count($where);
|
||||
if(!$pay_row){
|
||||
|
||||
@@ -51,6 +51,8 @@ class Stic extends Admin{
|
||||
$this->data['info'] = $info;
|
||||
$this->show_view('h5/market/sylive/stic/index');
|
||||
}else{ //门店和大区
|
||||
$biz_id = $this->input->get('biz_id');
|
||||
$info['biz_id'] = $biz_id ? $biz_id : 0;
|
||||
$this->data['info'] = $info;
|
||||
$this->show_view('h5/market/sylive/stic/area');
|
||||
}
|
||||
@@ -64,23 +66,9 @@ class Stic extends Admin{
|
||||
if(!$row && $this->group_id>=3){
|
||||
$this->show_json([],200);
|
||||
}
|
||||
$cell3 = $cell2 = [];
|
||||
$biz = $join = [];
|
||||
if($this->group_id<2){ //所有大区
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
];
|
||||
if($this->group_id==1){
|
||||
$org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$org_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
$where["area_id in (select organizationId from lc_market_sylive_organization where parentId={$org_id} and status=0)"] = null;
|
||||
}else{
|
||||
$where["a_id"] = $a_id;
|
||||
}
|
||||
$browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$subscribe_count = $this->mdSytActivityKpiData->count($where); //预约用户
|
||||
$biz_id = $this->input->get('biz_id');
|
||||
$sql = "select count(distinct areaId) as total from lc_market_sylive_activity_biz where `activityId`={$a_id}";
|
||||
$area_count = $this->mdSytActivityBiz->db->query($sql)->row_array();
|
||||
$sql = "select count(distinct bizId) as total from lc_market_sylive_activity_biz where `activityId`={$a_id}";
|
||||
@@ -92,49 +80,60 @@ class Stic extends Admin{
|
||||
)" => null
|
||||
];
|
||||
$gw_count = $this->user_model->count($where); //顾问
|
||||
$cell2 = [
|
||||
$join = [
|
||||
['title' => '参与大区', 'num' => "{$area_count['total']}个"],
|
||||
['title' => '参与门店', 'num' => "{$biz_count['total']}家"],
|
||||
['title' => '参与人数', 'num' => "{$gw_count}人"],
|
||||
];
|
||||
$where = [
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
'cf_uid' => $this->uid,
|
||||
'type' => 0
|
||||
];
|
||||
$owner_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$owner_subscribe_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$cell3 = [
|
||||
['title' => '访问用户', 'num' => "{$owner_browse_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=browse&a_id='.$a_id],
|
||||
['title' => '预约用户', 'num' => "{$owner_subscribe_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=subscribe&a_id='.$a_id],
|
||||
['title' => '预约率', 'num' => $owner_browse_count ? round($owner_subscribe_count/$owner_browse_count*100,2)."%" : 0],
|
||||
];
|
||||
}else{ //门店
|
||||
$biz_id = $this->session['org_id'];
|
||||
}
|
||||
$where = [
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
'cf_uid' => $this->uid,
|
||||
'type' => 0
|
||||
];
|
||||
$owner_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$owner_subscribe_count = $this->mdSytActivityKpiData->count($where); //订阅数据
|
||||
$mine = [
|
||||
['title' => '访问用户', 'num' => "{$owner_browse_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=browse&a_id='.$a_id],
|
||||
['title' => '预约用户', 'num' => "{$owner_subscribe_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=subscribe&a_id='.$a_id],
|
||||
['title' => '预约率', 'num' => $owner_browse_count ? round($owner_subscribe_count/$owner_browse_count*100,2)."%" : 0],
|
||||
];
|
||||
if($biz_id){
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
'biz_id' => $this->session['org_id'],
|
||||
'type' => 0
|
||||
'biz_id' => $biz_id
|
||||
];
|
||||
$browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$b_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$subscribe_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$b_subscribe_count = $this->mdSytActivityKpiData->count($where); //订阅数据
|
||||
$biz = [
|
||||
['title' => '访问用户', 'num' => "{$b_browse_count}人",'url'=>"/h5/market/sylive/stic/users?type=biz&type_id={$biz_id}&kpi=browse&a_id={$a_id}"],
|
||||
['title' => '预约用户', 'num' => "{$b_subscribe_count}人",'url'=>"/h5/market/sylive/stic/users?type=biz&type_id={$biz_id}&kpi=subscribe&a_id={$a_id}"],
|
||||
['title' => '预约率', 'num' => $b_browse_count ? round($b_subscribe_count/$b_browse_count*100,2)."%" : 0],
|
||||
];
|
||||
}
|
||||
$cell1 = [
|
||||
['title' => '访问用户', 'num' => "{$browse_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=browse&a_id='.$a_id],
|
||||
['title' => '预约用户', 'num' => "{$subscribe_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=subscribe&a_id='.$a_id],
|
||||
['title' => '预约率', 'num' => $browse_count ? round($subscribe_count/$browse_count*100,2)."%" : 0],
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
];
|
||||
if($this->group_id==3){
|
||||
$org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$biz_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
}elseif($this->group_id==2){
|
||||
$biz_id = $this->session['org_id'];
|
||||
}else{
|
||||
$biz_id = 0;
|
||||
}
|
||||
$area_id = $this->sylive_entity->get_area_id($this->session['org_id'],$this->group_id);
|
||||
$area_id && $where['area_id'] = $area_id;
|
||||
$a_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$a_subscribe_count = $this->mdSytActivityKpiData->count($where); //订阅数据
|
||||
$area = [
|
||||
['title' => '访问用户', 'num' => "{$a_browse_count}人",'url'=>"/h5/market/sylive/stic/users?type=area&type_id={$area_id}&kpi=browse&a_id={$a_id}"],
|
||||
['title' => '预约用户', 'num' => "{$a_subscribe_count}人",'url'=>"/h5/market/sylive/stic/users?type=area&type_id={$area_id}&kpi=subscribe&a_id={$a_id}"],
|
||||
['title' => '预约率', 'num' => $a_browse_count ? round($a_subscribe_count/$a_browse_count*100,2)."%" : 0],
|
||||
];
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$browse_lists = $this->sylive_entity->top_lists($a_id,'browse',1,10,$biz_id);
|
||||
$browse = [
|
||||
'title' => '门店<span class="color-00a2ff">浏览</span>排行',
|
||||
@@ -148,9 +147,10 @@ class Stic extends Admin{
|
||||
'list' => $book_lists['lists']
|
||||
];
|
||||
$data = [
|
||||
'cell1' => $cell1,
|
||||
'cell2' => $cell2,
|
||||
'cell3' => $cell3,
|
||||
'mine' => $mine,
|
||||
'biz' => $biz,
|
||||
'area' => $area,
|
||||
'join' => $join,
|
||||
'browse' => $browse,
|
||||
'book' => $book
|
||||
];
|
||||
@@ -166,24 +166,9 @@ class Stic extends Admin{
|
||||
if(!$row && $this->group_id>=3){
|
||||
$this->show_json([],200);
|
||||
}
|
||||
$cell4 = $cell3 = [];
|
||||
$view_num = $view_time = [];
|
||||
$biz = $join = $view_num = $view_time = [];
|
||||
if($this->group_id<2){ //所有大区
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'watch',
|
||||
];
|
||||
if($this->group_id==1){
|
||||
$org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$org_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
$where["area_id in (select organizationId from lc_market_sylive_organization where parentId={$org_id} and status=0)"] = null;
|
||||
}else{
|
||||
$where["a_id"] = $a_id;
|
||||
}
|
||||
$view_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'order';
|
||||
$order_count = $this->mdSytActivityKpiData->count($where); //预约用户
|
||||
$biz_id = $this->input->get('biz_id');
|
||||
$sql = "select count(distinct areaId) as total from lc_market_sylive_activity_biz where `activityId`={$a_id}";
|
||||
$area_count = $this->mdSytActivityBiz->db->query($sql)->row_array();
|
||||
$sql = "select count(distinct bizId) as total from lc_market_sylive_activity_biz where `activityId`={$a_id}";
|
||||
@@ -195,52 +180,70 @@ class Stic extends Admin{
|
||||
)" => null
|
||||
];
|
||||
$gw_count = $this->user_model->count($where); //顾问
|
||||
$cell3 = [
|
||||
$join = [
|
||||
['title' => '参与大区', 'num' => "{$area_count['total']}个"],
|
||||
['title' => '参与门店', 'num' => "{$biz_count['total']}家"],
|
||||
['title' => '参与人数', 'num' => "{$gw_count}人"],
|
||||
];
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'watch',
|
||||
'cf_uid' => $this->uid
|
||||
];
|
||||
$owner_view_count = $this->mdSytActivityKpiData->count($where); //观看数据
|
||||
$where['kpi'] = 'order';
|
||||
$owner_order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$cell4 = [
|
||||
['title' => '观看用户', 'num' => "{$owner_view_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=watch&a_id='.$a_id],
|
||||
['title' => '下单用户', 'num' => "{$owner_order_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=order&a_id='.$a_id],
|
||||
['title' => '转化率', 'num' => $owner_view_count ? round($owner_order_count/$owner_view_count*100,2)."%" : 0],
|
||||
];
|
||||
}else{ //门店
|
||||
$biz_id = $this->session['org_id'];
|
||||
// $view_num_lists = $this->sylive_entity->top_view_num($row['channelId'],1,10);
|
||||
// $view_num = [
|
||||
// 'title' => '客户<span class="color-00a2ff">观看次数</span>排行',
|
||||
// 'url' => '',
|
||||
// 'list' => $view_num_lists['lists']
|
||||
// ];
|
||||
// $view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10);
|
||||
// $view_time = [
|
||||
// 'title' => '客户<span class="color-00a2ff">观看时长</span>排行',
|
||||
// 'url' => '',
|
||||
// 'list' => $view_time_lists['lists']
|
||||
// ];
|
||||
}
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'watch',
|
||||
'cf_uid' => $this->uid,
|
||||
];
|
||||
$m_view_count = $this->mdSytActivityKpiData->count($where); //观看数据
|
||||
$where['kpi'] = 'order';
|
||||
$m_order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$mine = [
|
||||
['title' => '观看用户', 'num' => "{$m_view_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=watch&a_id='.$a_id],
|
||||
['title' => '下单用户', 'num' => "{$m_order_count}人",'url'=>'/h5/market/sylive/stic/users?type=owner&kpi=order&a_id='.$a_id],
|
||||
['title' => '转化率', 'num' => $m_view_count ? round($m_order_count/$m_view_count*100,2)."%" : 0],
|
||||
];
|
||||
if($biz_id){
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'watch',
|
||||
'biz_id' => $this->session['org_id']
|
||||
'biz_id' => $biz_id
|
||||
];
|
||||
$view_count = $this->mdSytActivityKpiData->count($where); //观看数据
|
||||
$b_view_count = $this->mdSytActivityKpiData->count($where); //观看数据
|
||||
$where['kpi'] = 'order';
|
||||
$order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$view_num_lists = $this->sylive_entity->top_view_num($row['channelId'],1,10);
|
||||
$view_num = [
|
||||
'title' => '客户<span class="color-00a2ff">观看次数</span>排行',
|
||||
'url' => '',
|
||||
'list' => $view_num_lists['lists']
|
||||
];
|
||||
$view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10);
|
||||
$view_time = [
|
||||
'title' => '客户<span class="color-00a2ff">观看时长</span>排行',
|
||||
'url' => '',
|
||||
'list' => $view_time_lists['lists']
|
||||
$b_order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$biz = [
|
||||
['title' => '观看用户', 'num' => "{$b_view_count}人",'url'=>"/h5/market/sylive/stic/users?type=biz&type_id={$biz_id}&kpi=watch&a_id={$a_id}"],
|
||||
['title' => '下单用户', 'num' => "{$b_order_count}人",'url'=>"/h5/market/sylive/stic/users?type=biz&type_id={$biz_id}&kpi=order&a_id={$a_id}"],
|
||||
['title' => '转化率', 'num' => $b_view_count ? round($b_order_count/$b_view_count*100,2)."%" : 0],
|
||||
];
|
||||
}
|
||||
$cell1 = [
|
||||
['title' => '观看用户', 'num' => "{$view_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=watch&a_id='.$a_id],
|
||||
['title' => '下单用户', 'num' => "{$order_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=order&a_id='.$a_id],
|
||||
['title' => '转化率', 'num' => $view_count ? round($order_count/$view_count*100,2)."%" : 0],
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'watch',
|
||||
];
|
||||
$area_id = $this->sylive_entity->get_area_id($this->session['org_id'],$this->group_id);
|
||||
$area_id && $where['area_id'] = $area_id;
|
||||
$a_view_count = $this->mdSytActivityKpiData->count($where); //观看数据
|
||||
$where['kpi'] = 'order';
|
||||
$a_order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$area = [
|
||||
['title' => '观看用户', 'num' => "{$a_view_count}人",'url'=>"/h5/market/sylive/stic/users?type=area&type_id={$area_id}&kpi=watch&a_id={$a_id}"],
|
||||
['title' => '下单用户', 'num' => "{$a_order_count}人",'url'=>"/h5/market/sylive/stic/users?type=area&type_id={$area_id}&kpi=order&a_id={$a_id}"],
|
||||
['title' => '转化率', 'num' => $a_view_count ? round($a_order_count/$a_view_count*100,2)."%" : 0],
|
||||
];
|
||||
$total_play = $this->mdPolyvSession->sum('totalPlayDuration',['channelId'=>$row['channelId']]);
|
||||
$duration = $this->mdPolyvSession->sum('duration',['channelId'=>$row['channelId']]);
|
||||
@@ -250,19 +253,12 @@ class Stic extends Admin{
|
||||
$livePV = $pv['livePV'] ? $pv['livePV'] : 0;
|
||||
$avg_UV_time = $uv['liveUV'] ? intval($total_play['totalPlayDuration']/$uv['liveUV']) : 0;
|
||||
$avg_UV_time = intval($avg_UV_time/60);
|
||||
$cell2 = [
|
||||
$l_time = [
|
||||
['title' => '直播时长', 'num' => "{$duration}分钟"],
|
||||
['title' => '人均观看', 'num' => "{$avg_UV_time}分钟"],
|
||||
['title' => '观看次数', 'num' => "{$livePV}次"],
|
||||
];
|
||||
if($this->group_id==3){
|
||||
$org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$biz_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
}elseif($this->group_id==2){
|
||||
$biz_id = $this->session['org_id'];
|
||||
}else{
|
||||
$biz_id = 0;
|
||||
}
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$watch_lists = $this->sylive_entity->top_lists($a_id,'watch',1,10,$biz_id);
|
||||
$view = [
|
||||
'title' => '门店<span class="color-00a2ff">观看</span>排行',
|
||||
@@ -276,10 +272,11 @@ class Stic extends Admin{
|
||||
'list' => $order_lists['lists']
|
||||
];
|
||||
$data = [
|
||||
'cell1' => $cell1,
|
||||
'cell2' => $cell2,
|
||||
'cell3' => $cell3,
|
||||
'cell4' => $cell4,
|
||||
'mine' => $mine,
|
||||
'biz' => $biz,
|
||||
'area' => $area,
|
||||
'l_time' => $l_time,
|
||||
'join' => $join,
|
||||
'view' => $view,
|
||||
'order' => $order,
|
||||
'view_num' => $view_num,
|
||||
@@ -301,14 +298,7 @@ class Stic extends Admin{
|
||||
$page = $params['page'] ? intval($params['page']) : 1;
|
||||
$info = $this->myencryption->base64url_decode($params['skey']);
|
||||
$a_id = intval($info['a_id']);//活动id
|
||||
if($this->group_id==3){
|
||||
$org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$biz_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
}elseif($this->group_id==2){
|
||||
$biz_id = $this->session['org_id'];
|
||||
}else{
|
||||
$biz_id = 0;
|
||||
}
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
$type = $params['type'] ? $params['type'] : 'browse';
|
||||
$data = $this->sylive_entity->top_lists($a_id,$type,$page,20,$biz_id);
|
||||
$data['title'] = $title_arr[$type];
|
||||
@@ -341,7 +331,6 @@ class Stic extends Admin{
|
||||
$row = $this->market_sylive_activity_model->get(['activityId'=>$a_id]);
|
||||
$where = [
|
||||
'a_id'=>$a_id,
|
||||
// 'kpi'=>'watch',
|
||||
'cf_uid'=>$this->uid,
|
||||
'type' => 0,
|
||||
];
|
||||
@@ -375,14 +364,7 @@ class Stic extends Admin{
|
||||
'lists' => $lists,
|
||||
'total' => $total
|
||||
];
|
||||
if($this->group_id==3){
|
||||
$org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$biz_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
}elseif($this->group_id==2){
|
||||
$biz_id = $this->session['org_id'];
|
||||
}else{
|
||||
$biz_id = 0;
|
||||
}
|
||||
$biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);
|
||||
if($type==1){
|
||||
$b_rows = $this->sylive_entity->top_biz_user($a_id,$biz_id,$this->uid,'browse');
|
||||
$data['browse'] = [
|
||||
@@ -405,17 +387,17 @@ class Stic extends Admin{
|
||||
'title' => '本店<span class="color-00a2ff">订单</span>排行',
|
||||
'list' => $order_rows['lists']
|
||||
];
|
||||
$view_num_lists = $this->sylive_entity->top_view_num($row['channelId'],1,10);
|
||||
$data['view_num'] = [
|
||||
'title' => '客户<span class="color-00a2ff">观看次数</span>排行',
|
||||
'list' => $view_num_lists['lists']
|
||||
];
|
||||
$view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10);
|
||||
$data['view_time'] = [
|
||||
'title' => '客户<span class="color-00a2ff">观看时长</span>排行',
|
||||
'url' => '',
|
||||
'list' => $view_time_lists['lists']
|
||||
];
|
||||
// $view_num_lists = $this->sylive_entity->top_view_num($row['channelId'],1,10);
|
||||
// $data['view_num'] = [
|
||||
// 'title' => '客户<span class="color-00a2ff">观看次数</span>排行',
|
||||
// 'list' => $view_num_lists['lists']
|
||||
// ];
|
||||
// $view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10);
|
||||
// $data['view_time'] = [
|
||||
// 'title' => '客户<span class="color-00a2ff">观看时长</span>排行',
|
||||
// 'url' => '',
|
||||
// 'list' => $view_time_lists['lists']
|
||||
// ];
|
||||
}
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
@@ -458,17 +440,11 @@ class Stic extends Admin{
|
||||
'a_id' => $params['a_id'],
|
||||
'kpi' => $params['kpi'],
|
||||
];
|
||||
if($params['type']=='all' && $this->group_id<3){ //所有
|
||||
if(!$this->group_id){ //品牌
|
||||
$where["a_id"] = $params['a_id'];
|
||||
}elseif($this->group_id==1){ //大区
|
||||
$org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']],'parentId');
|
||||
$org_id = $org_row['parentId'] ? $org_row['parentId'] : 0;
|
||||
$where["area_id in (select organizationId from lc_market_sylive_organization where parentId={$org_id} and status=0)"] = null;
|
||||
}else{ //店长
|
||||
$where['biz_id'] = $this->session['org_id'];
|
||||
}
|
||||
}else{ //只显示个人
|
||||
if($params['type']=='area'){
|
||||
$params['type_id'] && $where['area_id'] = $params['type_id'];
|
||||
}elseif($params['type']=='biz'){
|
||||
$where['biz_id'] = $params['type_id'];
|
||||
}else{
|
||||
$where['cf_uid'] = $this->uid;
|
||||
}
|
||||
$total = $this->mdSytActivityKpiData->count($where);
|
||||
|
||||
@@ -178,23 +178,23 @@ class Tstic extends Admin{
|
||||
$view_count = $this->mdSytActivityKpiData->count($where); //观看数据
|
||||
$where['kpi'] = 'order';
|
||||
$order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$where = [
|
||||
'type' => 1,
|
||||
'a_id' => $a_id,
|
||||
'biz_id' => $this->session['teamId'],
|
||||
];
|
||||
$view_num_lists = $this->sylive_entity->top_team_view_num($where,1,10);
|
||||
$view_num = [
|
||||
'title' => '客户<span class="color-00a2ff">观看次数</span>排行',
|
||||
'url' => '',
|
||||
'list' => $view_num_lists['lists']
|
||||
];
|
||||
$view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10);
|
||||
$view_time = [
|
||||
'title' => '客户<span class="color-00a2ff">观看时长</span>排行',
|
||||
'url' => '',
|
||||
'list' => $view_time_lists['lists']
|
||||
];
|
||||
// $where = [
|
||||
// 'type' => 1,
|
||||
// 'a_id' => $a_id,
|
||||
// 'biz_id' => $this->session['teamId'],
|
||||
// ];
|
||||
// $view_num_lists = $this->sylive_entity->top_team_view_num($where,1,10);
|
||||
// $view_num = [
|
||||
// 'title' => '客户<span class="color-00a2ff">观看次数</span>排行',
|
||||
// 'url' => '',
|
||||
// 'list' => $view_num_lists['lists']
|
||||
// ];
|
||||
// $view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10);
|
||||
// $view_time = [
|
||||
// 'title' => '客户<span class="color-00a2ff">观看时长</span>排行',
|
||||
// 'url' => '',
|
||||
// 'list' => $view_time_lists['lists']
|
||||
// ];
|
||||
$where = [
|
||||
'type' => 1,
|
||||
'a_id' => $a_id,
|
||||
@@ -367,22 +367,22 @@ class Tstic extends Admin{
|
||||
'title' => '团队<span class="color-00a2ff">订单</span>排行',
|
||||
'list' => $order_rows['lists']
|
||||
];
|
||||
$where = [
|
||||
'a_id' => $a_id,
|
||||
'type' => 1,
|
||||
'biz_id' => $teamId,
|
||||
];
|
||||
$view_num_lists = $this->sylive_entity->top_team_view_num($where,1,10);
|
||||
$data['view_num'] = [
|
||||
'title' => '团队<span class="color-00a2ff">观看次数</span>排行',
|
||||
'list' => $view_num_lists['lists']
|
||||
];
|
||||
$view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10);
|
||||
$data['view_time'] = [
|
||||
'title' => '团队<span class="color-00a2ff">观看时长</span>排行',
|
||||
'url' => '',
|
||||
'list' => $view_time_lists['lists']
|
||||
];
|
||||
// $where = [
|
||||
// 'a_id' => $a_id,
|
||||
// 'type' => 1,
|
||||
// 'biz_id' => $teamId,
|
||||
// ];
|
||||
// $view_num_lists = $this->sylive_entity->top_team_view_num($where,1,10);
|
||||
// $data['view_num'] = [
|
||||
// 'title' => '团队<span class="color-00a2ff">观看次数</span>排行',
|
||||
// 'list' => $view_num_lists['lists']
|
||||
// ];
|
||||
// $view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10);
|
||||
// $data['view_time'] = [
|
||||
// 'title' => '团队<span class="color-00a2ff">观看时长</span>排行',
|
||||
// 'url' => '',
|
||||
// 'list' => $view_time_lists['lists']
|
||||
// ];
|
||||
}
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
|
||||
@@ -19,10 +19,30 @@
|
||||
<!--预热阶段-->
|
||||
<div v-if="tabid==1">
|
||||
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="begin.cell3 && begin.cell3.length>0">
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="begin.mine && begin.mine.length>0">
|
||||
<div class="orderTip text-center font-24 color-fff bg-ff5a5a">我的</div>
|
||||
<div class="fn-flex pl20 pr20 text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.cell3" :href="item.url">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.mine" :href="item.url">
|
||||
<div class="font-32 color-fe9538">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="begin.biz && begin.biz.length>0">
|
||||
<div class="orderTip text-center font-24 color-fff bg-ff5a5a">本店</div>
|
||||
<div class="fn-flex pl20 pr20 text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.biz" :href="item.url">
|
||||
<div class="font-32 color-fe9538">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="begin.area && begin.area.length>0">
|
||||
<div class="orderTip text-center font-24 color-fff bg-ff5a5a">全域</div>
|
||||
<div class="fn-flex pl20 pr20 text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.area" :href="item.url">
|
||||
<div class="font-32 color-fe9538">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i></div>
|
||||
</a>
|
||||
@@ -30,16 +50,8 @@
|
||||
</div>
|
||||
|
||||
<div class="mt30 overflowhidden ulib-r20">
|
||||
<div class="bg-fff5ec fn-flex text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.cell1" :href="item.url">
|
||||
<div class="font-32 color-fe9538">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">
|
||||
{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-f6 fn-flex text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.cell2" :href="item.url">
|
||||
<div class="bg-fff5ec fn-flex text-center" v-if="begin.join && begin.join.length>0">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.join" :href="item.url">
|
||||
<div class="font-32">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}</div>
|
||||
</a>
|
||||
@@ -51,7 +63,7 @@
|
||||
<b class="fn-fl font-40 text-italic" v-html="begin.browse.title"></b>
|
||||
<a class="mt5 fn-fr font-28" :href="begin.browse.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div v-if="begin.browse.list.length>0">
|
||||
<div v-if="begin.browse && begin.browse.list">
|
||||
<div class="font-32 color-666" v-for="(item,index) in begin.browse.list">
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl wp70 text-nowrap">
|
||||
@@ -72,7 +84,7 @@
|
||||
<b class="fn-fl font-40 text-italic" v-html="begin.book.title"></b>
|
||||
<a class="mt5 fn-fr font-28" :href="begin.book.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div v-if="begin.book.list.length>0">
|
||||
<div v-if="begin.book && begin.book.list">
|
||||
<div class="font-32 color-666" v-for="(item,index) in begin.book.list">
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl wp70 text-nowrap">
|
||||
@@ -92,35 +104,46 @@
|
||||
<!-- end 预热阶段-->
|
||||
<!--直播阶段-->
|
||||
<div v-if="tabid==2">
|
||||
<div class="mt30 bg-f9 inner20 overflowhidden text-center font-24 color-666 ulib-r20">直播结束后2小时同步完整数据</div>
|
||||
<div class="mt30 bg-f9 inner20 overflowhidden text-center font-24 color-666 ulib-r20">直播结束后6小时同步完整数据</div>
|
||||
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="live.cell4 && live.cell4.length>0">
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="live.mine && live.mine.length>0">
|
||||
<div class="orderTip text-center font-24 color-fff bg-ff5a5a">我的</div>
|
||||
<div class="fn-flex pl20 pr20 text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.cell4" :href="item.url">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.mine" :href="item.url">
|
||||
<div class="font-32 color-fe9538">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 overflowhidden ulib-r20">
|
||||
<div class="bg-fff5ec fn-flex text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.cell1" :href="item.url">
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="live.biz && live.biz.length>0">
|
||||
<div class="orderTip text-center font-24 color-fff bg-ff5a5a">本店</div>
|
||||
<div class="fn-flex pl20 pr20 text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.biz" :href="item.url">
|
||||
<div class="font-32 color-fe9538">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">
|
||||
{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i>
|
||||
</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-f6 fn-flex text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.cell2" :href="item.url">
|
||||
</div>
|
||||
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="live.area && live.area.length>0">
|
||||
<div class="orderTip text-center font-24 color-fff bg-ff5a5a">全域</div>
|
||||
<div class="fn-flex pl20 pr20 text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.area" :href="item.url">
|
||||
<div class="font-32 color-fe9538">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}<i v-if="item.url" class="iconfont icon-gengduo"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt30 overflowhidden ulib-r20">
|
||||
<div class="bg-f6 fn-flex text-center" v-if="live.l_time && live.l_time.length>0">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.l_time" :href="item.url">
|
||||
<div class="font-32">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bg-fff5ec fn-flex text-center">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.cell3" :href="item.url">
|
||||
<div class="bg-fff5ec fn-flex text-center" v-if="live.join && live.join.length>0">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in live.join" :href="item.url">
|
||||
<div class="font-32">{{item.num}}</div>
|
||||
<div class="mt10 font-22 color-666">{{item.title}}</div>
|
||||
</a>
|
||||
@@ -169,12 +192,12 @@
|
||||
<div class="pt100 pb100 text-center font-32 color-666" v-else>暂时无数据</div>
|
||||
</div>
|
||||
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20" v-if="live.view_num">
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20" v-if="live.view_num && live.view_num.list">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="live.view_num.title"></b>
|
||||
<a class="mt5 fn-fr font-28" v-if="live.view_num.url" :href="live.view_num.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div v-if="live.view_num.list.length>0">
|
||||
<div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in live.view_num.list">
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl wp70 text-nowrap">
|
||||
@@ -191,12 +214,12 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20" v-if="live.view_time">
|
||||
<div class="mt30 bg-f9 inner40 overflowhidden ulib-r20" v-if="live.view_time && live.view_time.list">
|
||||
<div class="pb20 fn-clear">
|
||||
<b class="fn-fl font-40 text-italic" v-html="live.view_time.title"></b>
|
||||
<a class="mt5 fn-fr font-28" v-if="live.view_time.url" :href="live.view_time.url">查看更多<i class="iconfont icon-gengduo"></i></a>
|
||||
</div>
|
||||
<div v-if="live.view_time.list.length>0">
|
||||
<div>
|
||||
<div class="font-32 color-666" v-for="(item,index) in live.view_time.list">
|
||||
<div class="pt20 pb20 fn-clear">
|
||||
<div class="fn-fl wp70 text-nowrap">
|
||||
@@ -232,8 +255,10 @@
|
||||
info:'',
|
||||
loading: false,
|
||||
begin:{
|
||||
cell1:[],
|
||||
cell2:[],
|
||||
mine:[],
|
||||
biz:[],
|
||||
area:[],
|
||||
join:[],
|
||||
browse:{
|
||||
title:'',
|
||||
url:'',
|
||||
@@ -246,9 +271,11 @@
|
||||
}
|
||||
},
|
||||
live:{
|
||||
cell1:[],
|
||||
cell2:[],
|
||||
cell3:[],
|
||||
mine:[],
|
||||
biz:[],
|
||||
area:[],
|
||||
l_time:[],
|
||||
join:[],
|
||||
view:{
|
||||
title:'',
|
||||
url:'',
|
||||
@@ -348,7 +375,7 @@
|
||||
if (!that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/stic/lists_ready',{'skey':'<?=$skey?>'},function (result){
|
||||
$.get('/h5/market/sylive/stic/lists_ready',{'skey':'<?=$skey?>','biz_id':'<?=$info['biz_id']?>'},function (result){
|
||||
that.loading = false;
|
||||
if(result.data){
|
||||
that.begin = result.data
|
||||
@@ -364,7 +391,7 @@
|
||||
if (!that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/stic/lists_live',{'skey':'<?=$skey?>'},function (result){
|
||||
$.get('/h5/market/sylive/stic/lists_live',{'skey':'<?=$skey?>','biz_id':'<?=$info['biz_id']?>'},function (result){
|
||||
that.loading = false;
|
||||
if(result.data){
|
||||
that.live = result.data
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if (!that.isNoData && !that.isDataEnd && !that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/stic/user_lists',{'a_id':'<?=$params['a_id']?>','type':'<?=$params['type']?>','kpi':'<?=$params['kpi']?>','page':that.page,'tabid':that.tabid},function (res){
|
||||
$.get('/h5/market/sylive/stic/user_lists',{'a_id':'<?=$params['a_id']?>','type':'<?=$params['type']?>','type_id':'<?=$params['type_id']?>','kpi':'<?=$params['kpi']?>','page':that.page,'tabid':that.tabid},function (res){
|
||||
that.loading = false;
|
||||
that.page = that.page + 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user