From 6bd6e7d501b14582e2eb605a2287439e29400b7f Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Sun, 9 Oct 2022 14:59:27 +0800 Subject: [PATCH] edit-market-sylive --- home/controllers/h5/market/sylive/Biz.php | 25 ++++++++++------ home/controllers/h5/market/sylive/Stic.php | 7 ++++- home/views/h5/market/sylive/biz/brands.php | 30 +++++++++++--------- home/views/h5/market/sylive/biz/index.php | 24 ++++++++-------- home/views/h5/market/sylive/biz/lists.php | 32 +++++++++++---------- home/views/h5/market/sylive/header.php | 2 +- home/views/h5/market/sylive/login.php | 2 +- home/views/h5/market/sylive/nav.php | 4 +++ home/views/h5/market/sylive/stic/area.php | 1 + home/views/h5/market/sylive/stic/index.php | 7 +++-- home/views/h5/market/sylive/stic/rank.php | 8 +++--- home/views/h5/market/sylive/stic/users.php | 33 ++++++++++++++-------- www/home/css/h5/market/sylive/h5.css | 2 +- 13 files changed, 107 insertions(+), 70 deletions(-) create mode 100644 home/views/h5/market/sylive/nav.php 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 @@
{{item.title}}
- 门店{{item.storenum}} - 活动{{item.activitynum}} + 门店{{item.storenum}} + 活动{{item.activitynum}}
{{item.state.title}} @@ -47,21 +47,23 @@
- -
{{item.title}}
-
{{item.time}}
-
-
暂无数据
-
请稍等...
-
我们是有底线的
+
暂无数据
+
请稍等...
+
我们是有底线的
@@ -162,7 +164,7 @@ that.list = that.list.concat(result.data.list); if (result.data.total == 0) { that.isNoData = true; - } else if (that.list.length == result.data.total) { + } else if (that.list.length == result.data.total && result.data.total>10) { that.isDataEnd = true; } },'json') @@ -180,7 +182,7 @@ that.list = that.list.concat(result.data.list); if (result.data.total == 0) { that.isNoData = true; - } else if (that.list.length == result.data.total) { + } else if (that.list.length == result.data.total && result.data.total>10) { that.isDataEnd = true; } },'json') diff --git a/home/views/h5/market/sylive/biz/index.php b/home/views/h5/market/sylive/biz/index.php index 894230bd..e507e3c7 100644 --- a/home/views/h5/market/sylive/biz/index.php +++ b/home/views/h5/market/sylive/biz/index.php @@ -15,20 +15,22 @@
{{info.title}}
- -
{{item.title}}
-
{{item.time}}
-
- {{item.state.title}} + - + +
-
暂无数据
-
请稍等...
-
我们是有底线的
+
暂无数据
+
请稍等...
+
我们是有底线的
@@ -90,7 +92,7 @@ that.list = that.list.concat(result.data.list); if (result.data.total == 0) { that.isNoData = true; - } else if (that.list.length == result.data.total) { + } else if (that.list.length == result.data.total && result.data.total>10) { that.isDataEnd = true; } },'json') diff --git a/home/views/h5/market/sylive/biz/lists.php b/home/views/h5/market/sylive/biz/lists.php index a86b56e1..4016b1bf 100644 --- a/home/views/h5/market/sylive/biz/lists.php +++ b/home/views/h5/market/sylive/biz/lists.php @@ -40,8 +40,8 @@
{{item.title}}
- 顾问{{item.storenum}} - 活动{{item.activitynum}} + 顾问{{item.storenum}} + 活动{{item.activitynum}}
{{item.state.title}} @@ -52,21 +52,23 @@
- -
{{item.title}}
-
{{item.time}}
-
-
暂无数据
-
请稍等...
-
我们是有底线的
+
暂无数据
+
请稍等...
+
我们是有底线的
@@ -162,13 +164,13 @@ if (!that.isNoData && !that.isDataEnd && !that.loading) { that.loading = true; //请求接口 - $.get('/h5/market/sylive/biz/biz_lists',{'area_id':},function (result) { + $.get('/h5/market/sylive/biz/biz_lists',{'area_id':,'page':that.page},function (result) { that.loading = false; that.page = that.page + 1; that.list = that.list.concat(result.data.list); if (result.data.total == 0) { that.isNoData = true; - } else if (that.list.length == result.data.total) { + } else if (that.list.length == result.data.total && result.data.total>10) { that.isDataEnd = true; } },'json') @@ -186,7 +188,7 @@ that.list = that.list.concat(result.data.list); if (result.data.total == 0) { that.isNoData = true; - } else if (that.list.length == result.data.total) { + } else if (that.list.length == result.data.total && result.data.total>10) { that.isDataEnd = true; } },'json') diff --git a/home/views/h5/market/sylive/header.php b/home/views/h5/market/sylive/header.php index bdcb24aa..14b2d019 100644 --- a/home/views/h5/market/sylive/header.php +++ b/home/views/h5/market/sylive/header.php @@ -7,7 +7,7 @@ content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <?=$_title?> - + diff --git a/home/views/h5/market/sylive/login.php b/home/views/h5/market/sylive/login.php index fff600b7..2d54bb08 100644 --- a/home/views/h5/market/sylive/login.php +++ b/home/views/h5/market/sylive/login.php @@ -7,7 +7,7 @@ content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <?=$_title?> - + diff --git a/home/views/h5/market/sylive/nav.php b/home/views/h5/market/sylive/nav.php new file mode 100644 index 00000000..864fa514 --- /dev/null +++ b/home/views/h5/market/sylive/nav.php @@ -0,0 +1,4 @@ + + +
首页
+
\ No newline at end of file diff --git a/home/views/h5/market/sylive/stic/area.php b/home/views/h5/market/sylive/stic/area.php index e050433b..f27d56ca 100644 --- a/home/views/h5/market/sylive/stic/area.php +++ b/home/views/h5/market/sylive/stic/area.php @@ -175,6 +175,7 @@
进入活动
+ load->view('h5/market/sylive/nav');?>