From da45e3a48c0ce2d3e5df7c2519d8c6a04b461237 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Wed, 26 Oct 2022 17:12:44 +0800 Subject: [PATCH] edit-sylive-static_hidden_view --- common/libraries/market/Sylive_entity.php | 32 +++ home/controllers/h5/market/sylive/Biz.php | 9 +- home/controllers/h5/market/sylive/Stic.php | 280 +++++++++----------- home/controllers/h5/market/sylive/Tstic.php | 66 ++--- home/views/h5/market/sylive/stic/area.php | 103 ++++--- home/views/h5/market/sylive/stic/users.php | 2 +- 6 files changed, 261 insertions(+), 231 deletions(-) diff --git a/common/libraries/market/Sylive_entity.php b/common/libraries/market/Sylive_entity.php index 8494605c..5a359a34 100644 --- a/common/libraries/market/Sylive_entity.php +++ b/common/libraries/market/Sylive_entity.php @@ -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 diff --git a/home/controllers/h5/market/sylive/Biz.php b/home/controllers/h5/market/sylive/Biz.php index 62114b74..5bf5ee40 100644 --- a/home/controllers/h5/market/sylive/Biz.php +++ b/home/controllers/h5/market/sylive/Biz.php @@ -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){ diff --git a/home/controllers/h5/market/sylive/Stic.php b/home/controllers/h5/market/sylive/Stic.php index aef1f8a6..e7dfd64e 100644 --- a/home/controllers/h5/market/sylive/Stic.php +++ b/home/controllers/h5/market/sylive/Stic.php @@ -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' => '门店浏览排行', @@ -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' => '客户观看次数排行', +// 'url' => '', +// 'list' => $view_num_lists['lists'] +// ]; +// $view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10); +// $view_time = [ +// 'title' => '客户观看时长排行', +// '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' => '客户观看次数排行', - 'url' => '', - 'list' => $view_num_lists['lists'] - ]; - $view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10); - $view_time = [ - 'title' => '客户观看时长排行', - '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' => '门店观看排行', @@ -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' => '本店订单排行', 'list' => $order_rows['lists'] ]; - $view_num_lists = $this->sylive_entity->top_view_num($row['channelId'],1,10); - $data['view_num'] = [ - 'title' => '客户观看次数排行', - 'list' => $view_num_lists['lists'] - ]; - $view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10); - $data['view_time'] = [ - 'title' => '客户观看时长排行', - 'url' => '', - 'list' => $view_time_lists['lists'] - ]; +// $view_num_lists = $this->sylive_entity->top_view_num($row['channelId'],1,10); +// $data['view_num'] = [ +// 'title' => '客户观看次数排行', +// 'list' => $view_num_lists['lists'] +// ]; +// $view_time_lists = $this->sylive_entity->top_view_time($row['channelId'],1,10); +// $data['view_time'] = [ +// 'title' => '客户观看时长排行', +// '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); diff --git a/home/controllers/h5/market/sylive/Tstic.php b/home/controllers/h5/market/sylive/Tstic.php index 6b2600fe..a0dd5df0 100644 --- a/home/controllers/h5/market/sylive/Tstic.php +++ b/home/controllers/h5/market/sylive/Tstic.php @@ -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' => '客户观看次数排行', - 'url' => '', - 'list' => $view_num_lists['lists'] - ]; - $view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10); - $view_time = [ - 'title' => '客户观看时长排行', - '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' => '客户观看次数排行', +// 'url' => '', +// 'list' => $view_num_lists['lists'] +// ]; +// $view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10); +// $view_time = [ +// 'title' => '客户观看时长排行', +// 'url' => '', +// 'list' => $view_time_lists['lists'] +// ]; $where = [ 'type' => 1, 'a_id' => $a_id, @@ -367,22 +367,22 @@ class Tstic extends Admin{ 'title' => '团队订单排行', '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' => '团队观看次数排行', - 'list' => $view_num_lists['lists'] - ]; - $view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10); - $data['view_time'] = [ - 'title' => '团队观看时长排行', - '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' => '团队观看次数排行', +// 'list' => $view_num_lists['lists'] +// ]; +// $view_time_lists = $this->sylive_entity->top_team_view_time($where,1,10); +// $data['view_time'] = [ +// 'title' => '团队观看时长排行', +// 'url' => '', +// 'list' => $view_time_lists['lists'] +// ]; } $this->show_json($data,200); } diff --git a/home/views/h5/market/sylive/stic/area.php b/home/views/h5/market/sylive/stic/area.php index 36729c08..593d312c 100644 --- a/home/views/h5/market/sylive/stic/area.php +++ b/home/views/h5/market/sylive/stic/area.php @@ -19,10 +19,30 @@