add-sylive-stic_title
This commit is contained in:
@@ -280,8 +280,8 @@ class Biz extends Admin {
|
||||
$way = $pay['way'] ? intval($pay['way']) : 1; //1厂商支付 2 经销商支付
|
||||
$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}&biz_id={$biz_id}";
|
||||
$url = "/h5/market/sylive/act?skey={$skey}&biz_id={$biz_id}&area_id={$area_id}";
|
||||
$stat_url = "/h5/market/sylive/stic?skey={$skey}&biz_id={$biz_id}&area_id={$area_id}";
|
||||
if($way==2 && in_array($this->group_id,[2,3])){
|
||||
$where = [
|
||||
'activityId' => $val['activityId'],
|
||||
|
||||
@@ -51,8 +51,19 @@ 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;
|
||||
$params = $this->input->get();
|
||||
$info['biz_id'] = $params['biz_id'] ? $params['biz_id'] : 0;
|
||||
$info['area_id'] = $params['area_id'] ? $params['area_id'] : 0;
|
||||
$h_title = '';
|
||||
if($info['area_id']){
|
||||
$a_row = $this->market_sylive_organization_model->get(['organizationId'=>$info['area_id']],'organizationName');
|
||||
$h_title .= $a_row['organizationName']." ";
|
||||
}
|
||||
if($info['biz_id']){
|
||||
$b_row = $this->market_sylive_organization_model->get(['organizationId'=>$info['biz_id']],'organizationName');
|
||||
$h_title .= $b_row['organizationName'];
|
||||
}
|
||||
$this->data['h_title'] = $h_title;
|
||||
$this->data['info'] = $info;
|
||||
$this->show_view('h5/market/sylive/stic/area');
|
||||
}
|
||||
@@ -67,9 +78,10 @@ class Stic extends Admin{
|
||||
$this->show_json([],200);
|
||||
}
|
||||
$area_name = '';
|
||||
$area = $biz = $join = [];
|
||||
$all = $area = $biz = $join = [];
|
||||
if($this->group_id<2){ //所有大区
|
||||
$biz_id = $this->input->get('biz_id');
|
||||
$area_id = $this->input->get('area_id');
|
||||
if(!$this->group_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();
|
||||
@@ -87,23 +99,38 @@ class Stic extends Admin{
|
||||
['title' => '参与门店', 'num' => "{$biz_count['total']}家"],
|
||||
['title' => '参与人数', 'num' => "{$gw_count}人"],
|
||||
];
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
];
|
||||
$all_browse_count = $this->mdSytActivityKpiData->count($where); //浏览数据
|
||||
$where['kpi'] = 'subscribe';
|
||||
$all_subscribe_count = $this->mdSytActivityKpiData->count($where); //订阅数据
|
||||
$all = [
|
||||
['title' => '访问用户', 'num' => "{$all_browse_count}人",'url'=>"/h5/market/sylive/stic/users?type=all&kpi=browse&a_id={$a_id}"],
|
||||
['title' => '预约用户', 'num' => "{$all_subscribe_count}人",'url'=>"/h5/market/sylive/stic/users?type=all&kpi=subscribe&a_id={$a_id}"],
|
||||
['title' => '预约率', 'num' => $all_browse_count ? round($all_subscribe_count/$all_browse_count*100,2)."%" : 0],
|
||||
];
|
||||
}else{
|
||||
$area_id = $this->session['org_id'];
|
||||
}
|
||||
if($area_id){
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
];
|
||||
$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],
|
||||
];
|
||||
}
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'browse',
|
||||
];
|
||||
$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],
|
||||
];
|
||||
$area_name = $area_id ? '本域' : '全域';
|
||||
}else{ //门店
|
||||
$biz_id = $this->session['org_id'];
|
||||
}
|
||||
@@ -154,6 +181,7 @@ class Stic extends Admin{
|
||||
'mine' => $mine,
|
||||
'biz' => $biz,
|
||||
'area' => $area,
|
||||
'all' => $all,
|
||||
'join' => $join,
|
||||
'browse' => $browse,
|
||||
'book' => $book,
|
||||
@@ -172,9 +200,10 @@ class Stic extends Admin{
|
||||
$this->show_json([],200);
|
||||
}
|
||||
$area_name = '';
|
||||
$area = $biz = $join = $view_num = $view_time = [];
|
||||
$all = $area = $biz = $join = $view_num = $view_time = [];
|
||||
if($this->group_id<2){ //所有大区
|
||||
$biz_id = $this->input->get('biz_id');
|
||||
$area_id = $this->input->get('area_id');
|
||||
if(!$this->group_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();
|
||||
@@ -192,23 +221,38 @@ class Stic extends Admin{
|
||||
['title' => '参与门店', 'num' => "{$biz_count['total']}家"],
|
||||
['title' => '参与人数', 'num' => "{$gw_count}人"],
|
||||
];
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'watch',
|
||||
];
|
||||
$all_view_count = $this->mdSytActivityKpiData->count($where); //观看数据
|
||||
$where['kpi'] = 'order';
|
||||
$all_order_count = $this->mdSytActivityKpiData->count($where); //下单数据
|
||||
$all = [
|
||||
['title' => '观看用户', 'num' => "{$all_view_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=watch&a_id='.$a_id],
|
||||
['title' => '下单用户', 'num' => "{$all_order_count}人",'url'=>'/h5/market/sylive/stic/users?type=all&kpi=order&a_id='.$a_id],
|
||||
['title' => '转化率', 'num' => $all_view_count ? round($all_order_count/$all_view_count*100,2)."%" : 0],
|
||||
];
|
||||
}else{
|
||||
$area_id = $this->session['org_id'];
|
||||
}
|
||||
if($area_id){
|
||||
$where = [
|
||||
'type' => 0,
|
||||
'a_id' => $a_id,
|
||||
'kpi' => 'watch',
|
||||
];
|
||||
$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],
|
||||
];
|
||||
}
|
||||
$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],
|
||||
];
|
||||
$area_name = $area_id ? '本域' : '全域';
|
||||
}else{ //门店
|
||||
$biz_id = $this->session['org_id'];
|
||||
// $view_num_lists = $this->sylive_entity->top_view_num($row['channelId'],1,10);
|
||||
@@ -284,6 +328,7 @@ class Stic extends Admin{
|
||||
'mine' => $mine,
|
||||
'biz' => $biz,
|
||||
'area' => $area,
|
||||
'all' => $all,
|
||||
'l_time' => $l_time,
|
||||
'join' => $join,
|
||||
'view' => $view,
|
||||
@@ -450,8 +495,10 @@ class Stic extends Admin{
|
||||
'a_id' => $params['a_id'],
|
||||
'kpi' => $params['kpi'],
|
||||
];
|
||||
if($params['type']=='area'){
|
||||
$params['type_id'] && $where['area_id'] = $params['type_id'];
|
||||
if($params['type']=='all'){
|
||||
|
||||
}elseif($params['type']=='area'){
|
||||
$where['area_id'] = $params['type_id'];
|
||||
}elseif($params['type']=='biz'){
|
||||
$where['biz_id'] = $params['type_id'];
|
||||
}else{
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/biz/act_list',{'biz_id':<?=$biz_id ? $biz_id : 0?>,'page':that.page},function (result) {
|
||||
$.get('/h5/market/sylive/biz/act_list',{'biz_id':<?=$biz_id ? $biz_id : 0?>,'area_id':<?=$area_id ? $area_id : 0?>,'page':that.page},function (result) {
|
||||
that.loading = false;
|
||||
that.page = that.page + 1;
|
||||
that.list = that.list.concat(result.data.list);
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
<div class="container bg-size-fullwidth bg-no-repeat bg-pos-top pb130" :style="'background-image:url('+info.theme+')'">
|
||||
<div class="h-290"></div>
|
||||
<div id="main" class="bg-fff mb30 ml30 mr30 inner30 box-shadow-lightGray ulib-r20" style="min-height:72vh;">
|
||||
<div class="mt10 pb30 text-center">
|
||||
<div class="inline-block relative pl10 pr10 tx-shadow-e5 font-36">
|
||||
<span class="relative z-index-1"><?=$h_title?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tabFixed">
|
||||
<div class="height-60"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-fff pl30 pr30 pt20 pb20">
|
||||
@@ -40,7 +45,7 @@
|
||||
</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">{{begin.area_name}}</div>
|
||||
<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>
|
||||
@@ -49,6 +54,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="begin.all && begin.all.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.all" :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" v-if="begin.join && begin.join.length>0">
|
||||
<a class="fn-flex-item pt40 pb40" v-for="item in begin.join" :href="item.url">
|
||||
@@ -127,7 +142,7 @@
|
||||
</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">{{live.area_name}}</div>
|
||||
<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>
|
||||
@@ -135,6 +150,16 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative mt30 bg-fff5ec overflowhidden ulib-r20" v-if="live.all && live.all.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.all" :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">
|
||||
@@ -258,6 +283,7 @@
|
||||
mine:[],
|
||||
biz:[],
|
||||
area:[],
|
||||
all:[],
|
||||
join:[],
|
||||
browse:{
|
||||
title:'',
|
||||
@@ -274,6 +300,7 @@
|
||||
mine:[],
|
||||
biz:[],
|
||||
area:[],
|
||||
all:[],
|
||||
l_time:[],
|
||||
join:[],
|
||||
view:{
|
||||
@@ -375,7 +402,7 @@
|
||||
if (!that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/stic/lists_ready',{'skey':'<?=$skey?>','biz_id':'<?=$info['biz_id']?>'},function (result){
|
||||
$.get('/h5/market/sylive/stic/lists_ready',{'skey':'<?=$skey?>','biz_id':'<?=$info['biz_id']?>','area_id':'<?=$info['area_id']?>'},function (result){
|
||||
that.loading = false;
|
||||
if(result.data){
|
||||
that.begin = result.data
|
||||
@@ -391,7 +418,7 @@
|
||||
if (!that.loading) {
|
||||
that.loading = true;
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/stic/lists_live',{'skey':'<?=$skey?>','biz_id':'<?=$info['biz_id']?>'},function (result){
|
||||
$.get('/h5/market/sylive/stic/lists_live',{'skey':'<?=$skey?>','biz_id':'<?=$info['biz_id']?>','area_id':'<?=$info['area_id']?>'},function (result){
|
||||
that.loading = false;
|
||||
if(result.data){
|
||||
that.live = result.data
|
||||
|
||||
Reference in New Issue
Block a user