diff --git a/home/controllers/h5/market/sylive/Biz.php b/home/controllers/h5/market/sylive/Biz.php
index afcbaa70..73aa043d 100644
--- a/home/controllers/h5/market/sylive/Biz.php
+++ b/home/controllers/h5/market/sylive/Biz.php
@@ -22,7 +22,15 @@ class Biz extends Admin {
throw new Hd_exception('权限不足',400);
}
$this->data['area_id'] = $this->input->get('area_id');
- $this->data['biz_id'] = $biz_id = $this->input->get('biz_id');
+ if($this->group_id==2){
+ $biz_id = $this->session['org_id'];
+ }elseif($this->group_id==3) {
+ $biz_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']]);
+ $biz_id = $biz_row['parentId'];
+ }else{
+ $biz_id = $this->input->get('biz_id');
+ }
+ $this->data['biz_id'] = $biz_id;
$this->data['group_id'] = $this->group_id;
$row = $this->market_sylive_organization_model->get(['organizationId'=>$biz_id]);
$this->data['headimg'] = $this->liche_img;
@@ -89,8 +97,8 @@ class Biz extends Admin {
];
$count_order = $this->mdSytActivityKpiData->count($where);
$count = [
- ['title' => '门店','num' => $count_biz,'icon' => 'icon-quyu'],
- ['title' => '顾问','num' => $count_gw,'icon' => 'icon-mendian'],
+ ['title' => '门店','num' => $count_biz,'icon' => 'icon-mendian'],
+ ['title' => '顾问','num' => $count_gw,'icon' => 'icon-wode'],
['title' => '活动','num' => $count_live,'icon' => 'icon-zhibo'],
['title' => '订单','num' => $count_order,'icon' => 'icon-dingdan'],
];
@@ -118,10 +126,10 @@ class Biz extends Admin {
];
$count_order = $this->mdSytActivityKpiData->count($where);
$count = [
- ['title' => '区域','num' => $count_dq],
- ['title' => '门店','num' => $count_biz],
- ['title' => '活动','num' => $count_live],
- ['title' => '订单','num' => $count_order],
+ ['title' => '区域','num' => $count_dq,'icon' => 'icon-quyu'],
+ ['title' => '门店','num' => $count_biz,'icon' => 'icon-mendian'],
+ ['title' => '活动','num' => $count_live,'icon' => 'icon-zhibo'],
+ ['title' => '订单','num' => $count_order,'icon' => 'icon-dingdan'],
];
$tab = [
['id' => 1, 'title' => '区域',],
@@ -250,8 +258,9 @@ class Biz extends Admin {
$skey = $this->myencryption->base64url_encode("a_id=" . $val['activityId']);
$temp = [
'title' => $val['title'],
- 'time' => date('Y-m-d',$s_time).'~'.date('Y-m-d',$e_time),
+ 'time' => date('Y-m-d H:i',$s_time).'~'.date('Y-m-d H:i',$e_time),
'url' => '/h5/market/sylive/act?skey='.$skey,
+ 'stat_url' => '/h5/market/sylive/stic?skey='.$skey,
'state' => $state,
];
$lists[] = $temp;
diff --git a/home/controllers/h5/market/sylive/Stic.php b/home/controllers/h5/market/sylive/Stic.php
index 02c17f7b..6f1d0336 100644
--- a/home/controllers/h5/market/sylive/Stic.php
+++ b/home/controllers/h5/market/sylive/Stic.php
@@ -305,6 +305,9 @@ class Stic extends Admin{
}
public function users(){
+ $map_kpi_name = [
+ 'browse' => '访问用户', 'subscribe' => '预约用户', 'order' => '下单用户','watch' => '观看用户'
+ ];
$params = $this->input->get();
if($this->input->is_ajax_request()){
$page = $params['page'] ? intval($params['page']) : 1;
@@ -328,7 +331,7 @@ class Stic extends Admin{
$total = $this->mdSytActivityKpiData->count($where);
$lists = [];
if($total){
- $rows = $this->mdSytActivityKpiData->select($where,'id desc',$page,20,'uid');
+ $rows = $this->mdSytActivityKpiData->select($where,'id desc',$page,20,'uid,c_time');
$uids = implode(',',array_unique(array_column($rows,'uid')));
$users = [];
if($uids){
@@ -344,10 +347,12 @@ class Stic extends Admin{
$lists[] = [
'nickname' => $nickname,
'headimg' => $headimg,
+ 'time' => friendly_date($item['c_time'])
];
}
}
$data = [
+ 'title' => $map_kpi_name[$params['kpi']],
'total' => $total,
'lists' => $lists
];
diff --git a/home/views/h5/market/sylive/biz/brands.php b/home/views/h5/market/sylive/biz/brands.php
index c6490934..a1bc41b2 100644
--- a/home/views/h5/market/sylive/biz/brands.php
+++ b/home/views/h5/market/sylive/biz/brands.php
@@ -35,8 +35,8 @@