From 2e3ba09cbcc6d27029c8cf896b807a3b78249118 Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Sat, 10 Dec 2022 17:28:07 +0800 Subject: [PATCH] edit-sylive-rank --- .../libraries/market/Sylive2_data_entity.php | 57 ++++--- common/libraries/market/Sylive2_entity.php | 18 ++- home/controllers/h5/market/sylive2/Biz.php | 2 +- home/controllers/h5/market/sylive2/Item.php | 17 +- home/controllers/h5/market/sylive2/Stic.php | 150 +++++++++++++----- home/views/h5/market/sylive2/act/share.php | 6 +- home/views/h5/market/sylive2/header.php | 2 +- home/views/h5/market/sylive2/item/detail.php | 20 +-- home/views/h5/market/sylive2/stic/rank.php | 42 ++++- home/views/h5/market/sylive2/stic/ranking.php | 50 ++++-- www/home/css/h5/market/sylive/h5.css | 2 +- 11 files changed, 262 insertions(+), 104 deletions(-) diff --git a/common/libraries/market/Sylive2_data_entity.php b/common/libraries/market/Sylive2_data_entity.php index 9e98efbb..822e3328 100644 --- a/common/libraries/market/Sylive2_data_entity.php +++ b/common/libraries/market/Sylive2_data_entity.php @@ -34,32 +34,34 @@ class Sylive2_data_entity{ $lists = []; if($total){ $rows = $this->ci->mdSytActivityKpiData->select_groupby($groupby, $where, $order, $page, $page_size, $select); - $biz_rows = $org_rows = []; - if($groupby=='cfUserId'){//顾问 - $user_ids = implode(',',array_column($rows,'cfUserId')); - if($user_ids){ - $org_rows = $this->ci->user_model->map('userId','',["userId in ($user_ids)"=>null],'','','','userId,uname as name,headimg'); - } - } + $target_rows = []; if($groupby=='bizId'){ - $biz_ids = implode(',',array_column($rows,'bizId')); - $biz_ids && $biz_rows = $this->ci->groups_model->map('groupsId','',["groupsId in ($biz_ids)"=>null],'','','','groupsId,groupsName'); + $biz_ids = implode(',',array_column($rows,'tagId')); + $biz_ids && $target_rows = $this->ci->groups_model->map('groupsId','',["groupsId in ($biz_ids)"=>null],'','','','groupsId,groupsName'); + }elseif($groupby=='levelId1'||$groupby=='levelId2'||$groupby=='levelId3'){ + $biz_ids = implode(',',array_column($rows,'tagId')); + $biz_ids && $target_rows = $this->ci->groups_model->map('groupsId','',["groupsId in ($biz_ids)"=>null],'','','','groupsId,groupsName'); + }else{ //顾问 + $user_ids = implode(',',array_column($rows,'tagId')); + $user_ids && $target_rows = $this->ci->user_model->map('userId','',["userId in ($user_ids)"=>null],'','','','userId,uname as name,headimg'); } $num_tip = $where['kpi'] == 'order' ? '单' : '人'; $start = $page>1 ? ($page-1)*$page_size : 0; foreach ($rows as $key=>$val) { - $name = $tip = $headimg = $biz_name = ''; - if($groupby=='cfUserId'){ - $org = $org_rows[$val['cfUserId']] ? $org_rows[$val['cfUserId']][0] : []; + $headimg = ''; + if($groupby=='bizId'){ + $biz = $target_rows[$val['tagId']][0]; + $name = $biz['groupsName']; + $tip = $tagId==$val['bizId'] ? '本店' : ''; + }elseif($groupby=='levelId1'||$groupby=='levelId2'||$groupby=='levelId3'){ + $biz = $target_rows[$val['tagId']][0]; + $name = $biz['groupsName']; + }else{ + $org = $target_rows[$val['tagId']] ? $target_rows[$val['tagId']][0] : []; $tip = $tagId==$val['cfUserId'] ? '本人' : ''; $name = $org['name']; $headimg = $org['headimg']; } - if($groupby=='bizId'){ - $biz = $biz_rows[$val['bizId']][0]; - $name = $biz['groupsName']; - $tip = $tagId==$val['bizId'] ? '本店' : ''; - } $lists[] = [ 'ranking' => $start+$key+1, 'name' => $name, @@ -83,20 +85,31 @@ class Sylive2_data_entity{ $lists = []; if($total){ $rows = $this->ci->groups_user_model->select_groupby($groupby, $where, $order, $page, $page_size, $select); - $biz_rows = []; + $target_rows = []; if($groupby=='bizId'){ - $biz_ids = implode(',',array_column($rows,'bizId')); - $biz_ids && $biz_rows = $this->ci->groups_model->map('groupsId','',["groupsId in ($biz_ids)"=>null],'','','','groupsId,groupsName'); + $biz_ids = implode(',',array_column($rows,'tagId')); + $biz_ids && $target_rows = $this->ci->groups_model->map('groupsId','',["groupsId in ($biz_ids)"=>null],'','','','groupsId,groupsName'); + }elseif($groupby=='levelId1'||$groupby=='levelId2'||$groupby=='levelId3'){ + $biz_ids = implode(',',array_column($rows,'tagId')); + $biz_ids && $target_rows = $this->ci->groups_model->map('groupsId','',["groupsId in ($biz_ids)"=>null],'','','','groupsId,groupsName'); + }else{ + $biz_ids = implode(',',array_column($rows,'tagId')); + $biz_ids && $target_rows = $this->ci->user_model->map('userId','',["userId in ($biz_ids)"=>null],'','','','userId,uname as name,headimg'); } - $start = $page>1 ? ($page-1)*$page_size : 0; $num_tip = $kpi == 'order' ? '单' : '人'; foreach ($rows as $key=>$val) { $tip = $headimg = $name = ''; if($groupby=='bizId'){ - $biz = $biz_rows[$val['bizId']][0]; + $biz = $target_rows[$val['tagId']][0]; $name = $biz['groupsName']; $tip = $tagId==$val['bizId'] ? '本店' : ''; + }elseif($groupby=='levelId1'||$groupby=='levelId2'||$groupby=='levelId3'){ + $biz = $target_rows[$val['tagId']][0]; + $name = $biz['groupsName']; + }else{ + $biz = $target_rows[$val['tagId']][0]; + $name = $biz['name']; } $lists[] = [ 'ranking' => $start+$key+1, diff --git a/common/libraries/market/Sylive2_entity.php b/common/libraries/market/Sylive2_entity.php index b506dc17..74fa3f88 100644 --- a/common/libraries/market/Sylive2_entity.php +++ b/common/libraries/market/Sylive2_entity.php @@ -145,16 +145,32 @@ class Sylive2_entity{ * @param $a_id * @return array */ - public function level_disk($a_id){ + public function level_disk($a_id,$groupsLevel=0){ $top_group = $this->ci->groups_model->get(['activityId'=>$a_id,'parentId'=>0],'statisticsType'); $disk = []; if($top_group['statisticsType']){ $where = ['dictId'=>$top_group['statisticsType']]; + $groupsLevel && $where["dictDataCode>"] = $groupsLevel; $disk = $this->ci->market_sys_dictionary_data_model->map('dictDataCode','dictDataName',$where,'','','','dictDataName,dictDataCode'); } return $disk; } + /** + * 获取等级字典 + * @param $a_id + * @return array + */ + public function level_disk_lists($a_id){ + $top_group = $this->ci->groups_model->get(['activityId'=>$a_id,'parentId'=>0],'statisticsType'); + $disk = []; + if($top_group['statisticsType']){ + $where = ['dictId'=>$top_group['statisticsType']]; + $disk = $this->ci->market_sys_dictionary_data_model->select($where,'','','','dictDataName,dictDataCode'); + } + return $disk; + } + public function __get($name) { if ('_model' === substr($name, -6)) { diff --git a/home/controllers/h5/market/sylive2/Biz.php b/home/controllers/h5/market/sylive2/Biz.php index bd6bfa56..e5977933 100644 --- a/home/controllers/h5/market/sylive2/Biz.php +++ b/home/controllers/h5/market/sylive2/Biz.php @@ -11,7 +11,7 @@ class Biz extends Admin{ public function index(){ $user = $this->user_model->get(['userId'=>$this->session['userId']]); $this->data['multi_org'] = $_SESSION[self::SESSION_KEY]['multi_org'] ? 1 : 0; - $this->data['isBiz'] = $user['bizId'] ? 1 : 0; + $this->data['isBiz'] = $user['bizId'] == $user['organizationId'] ? 1 : 0; $this->show_view('h5/market/sylive2/biz/index'); } diff --git a/home/controllers/h5/market/sylive2/Item.php b/home/controllers/h5/market/sylive2/Item.php index 0e78ff9b..8dcd4f3b 100644 --- a/home/controllers/h5/market/sylive2/Item.php +++ b/home/controllers/h5/market/sylive2/Item.php @@ -38,7 +38,7 @@ class Item extends Wx{ $s_time = time() < strtotime($row['timeStart']) ? strtotime($row['timeStart']) - time() : 0; $is_pay = $this->market_sylive_order_model->count(['itemId'=>$itemId,'activityId'=>$a_id,'status'=>1,'userId'=>$this->uid,'type'=>0]); if($is_pay){ - $url = http_host_com('home').'/h5/market/sylive2/ucenter?skey='.$skey; + $url = http_host_com('home').'/h5/market/sylive2/ucenter/orders?skey='.$skey; redirect($url);exit; } @@ -232,13 +232,18 @@ class Item extends Wx{ //获取验证码 public function get_code(){ $mobile = $this->input->post('mobile'); + $a_id = $this->input->post('a_id'); if(!mobile_valid($mobile)){ $this->show_json('',400,'请输入正确的手机号码'); } - //验证是否黑名单用户 -// if(!$this->ck_mobile($mobile)){ -// $this->show_json('',400,'本次活动仅限受邀客户参加'); -// } + $act = $this->market_sylive_activity_model->get(['activityId'=>$a_id]); + $jsondata = json_decode($act['jsondata'],true); + if($jsondata['blacklist']){ + //验证是否黑名单用户 + if(!$this->ck_mobile($mobile)){ + $this->show_json('',400,'本次活动仅限受邀客户参加'); + } + } $redis = &load_cache('redis'); $key = "sylive_item_code_{$this->uid}_{$mobile}"; $code = $redis->get($key); @@ -301,7 +306,7 @@ class Item extends Wx{ $mobile_list[] = trim($item); } } - $redis->save($ckey,$mobile_list,2*24*60*60); + $redis->save($ckey,$mobile_list,7*24*60*60); } if(in_array($mobile,$mobile_list)){ return false; diff --git a/home/controllers/h5/market/sylive2/Stic.php b/home/controllers/h5/market/sylive2/Stic.php index 39236960..6e4a78cb 100644 --- a/home/controllers/h5/market/sylive2/Stic.php +++ b/home/controllers/h5/market/sylive2/Stic.php @@ -33,9 +33,13 @@ class Stic extends Admin{ $info['banner'] = $jsondata['banner'] ? build_qiniu_image_url($jsondata['banner']) : Sylive_entity::DF_BANNER; $info['nickname'] = $user['nickname']; $info['headimg'] = $user['headimg']; - $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]); - $group_lists = $this->sylive2_entity->get_group_lists($group_user['groupsId'],$this->a_id); - $info['group_name'] = implode(' ',array_column($group_lists,'groupsName')); + $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]); + $info['group_name'] = ''; + if($groupsId){ + $group_lists = $this->sylive2_entity->get_group_lists($groupsId,$this->a_id); + unset($group_lists[0]); + $info['group_name'] = implode(' ',array_column($group_lists,'groupsName')); + } $info['groupsId'] = $groupsId ? $groupsId : $group_user['groupsId']; $info['is_biz'] = $group_user['bizId'] ? 1 : 0; $info['tab'] = time()>=strtotime($row['timeStart']) ? 2 : 1; @@ -49,20 +53,18 @@ class Stic extends Admin{ //预约阶段数据 public function lists_ready(){ $groupsId = $this->input->get('groupsId'); - $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]); + $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]); !$groupsId && $groupsId = $group_user['groupsId']; $group_row = $this->groups_model->get(['groupsId'=>$groupsId,'activityId'=>$this->a_id]); $disk = $this->sylive2_entity->level_disk($this->a_id); - if(!$group_user['bizId']){ - $i = $group_row['groupsLevel']+1; - for($i;$i<4;$i++){ + if(!$group_user['bizId'] && $disk){ + foreach ($disk as $key => $val) { $where = [ 'activityId' => $this->a_id, - 'groupsLevel' => $i + 'groupsLevel' => $key ]; $level_total = $this->groups_model->count($where); - $title = $disk[$i] ? $disk[$i] : "{$i}级"; - $h_lists[] = ['title'=> '参与'.$title,'num'=>"{$level_total}个"]; + $h_lists[] = ['title'=> "参与{$val}",'num'=>"{$level_total}个"]; } } $where = [ @@ -116,8 +118,8 @@ class Stic extends Admin{ ]; $sub_lists[] = ['title'=>'本店','lists'=>$biz]; } - if(!$group_row['ifBiz']){ //当前等级 - if(!$group_row['groupsLevel']){//顶级 + if($group_row['groupsId']!=$group_user['bizId']){ + if(!$group_row['groupsLevel'] && !$group_row['ifBiz']){//顶级 $b_sum = $this->groups_model->sum('browse',['groupsLevel'=>1,'activityId'=>$this->a_id]); $sub_sum = $this->groups_model->sum('subscribe',['groupsLevel'=>1,'activityId'=>$this->a_id]); $browse_count = $b_sum['browse'];//浏览数据 @@ -131,7 +133,9 @@ class Stic extends Admin{ ['title'=>'预约用户','num'=>"{$subscribe_count}人"], ['title'=>'预约率','num'=>$browse_count ? round($subscribe_count/$browse_count*100,2)."%" : 0], ]; - $sub_lists[] = ['title'=>"所有大区",'lists'=>$biz]; + $title = $disk[$group_row['groupsLevel']+1]? '所有'.$disk[$group_row['groupsLevel']+1] : '所有门店'; + $group_row['ifBiz'] && $title = $group_row['groupsName']; + $sub_lists[] = ['title'=>"{$title}",'lists'=>$biz]; } $data = [ 'h_lists' => $h_lists, @@ -143,7 +147,7 @@ class Stic extends Admin{ //直播统计数据 public function lists_live(){ $groupsId = $this->input->get('groupsId'); - $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]); + $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]); !$groupsId && $groupsId = $group_user['groupsId']; $group_row = $this->groups_model->get(['groupsId'=>$groupsId,'activityId'=>$this->a_id]); $row = $this->market_sylive_activity_model->get(['activityId'=>$this->a_id]); @@ -194,8 +198,9 @@ class Stic extends Admin{ ]; $sub_lists[] = ['title'=>'本店','lists'=>$biz]; } - if(!$group_row['ifBiz']){ //当前等级 - if(!$group_row['groupsLevel']){//顶级 + if($group_row['groupsId']!=$group_user['bizId']){ + $disk = $this->sylive2_entity->level_disk($this->a_id); + if(!$group_row['groupsLevel'] && !$group_row['ifBiz']){//顶级 $b_sum = $this->groups_model->sum('watch',['groupsLevel'=>1,'activityId'=>$this->a_id]); $sub_sum = $this->groups_model->sum('orderTotal',['groupsLevel'=>1,'activityId'=>$this->a_id]); $browse_count = $b_sum['watch'];//观看数据 @@ -209,7 +214,9 @@ class Stic extends Admin{ ['title'=>'下单数','num'=>"{$subscribe_count}人"], ['title'=>'转化率','num'=>$browse_count ? round($subscribe_count/$browse_count*100,2)."%" : 0], ]; - $sub_lists[] = ['title'=>"所有大区",'lists'=>$biz]; + $title = $disk[$group_row['groupsLevel']+1]? '所有'.$disk[$group_row['groupsLevel']+1] : '所有门店'; + $group_row['ifBiz'] && $title = $group_row['groupsName']; + $sub_lists[] = ['title'=>"{$title}",'lists'=>$biz]; } $data = [ 'h_lists' => $h_lists, @@ -226,7 +233,7 @@ class Stic extends Admin{ $type = $this->input->get('type'); !$page && $page=1; $row = $this->market_sylive_activity_model->get(['activityId'=>$this->a_id]); - $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]); + $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]); $where = [ 'activityId'=>$this->a_id, 'bizId'=>$group_user['bizId'], @@ -421,11 +428,18 @@ class Stic extends Admin{ if($rows){ foreach ($rows as $item) { $count = $this->groups_model->count(['activityId'=>$this->a_id,'status'=>0,'parentId'=>$item['groupsId']]); + $url = $note = ''; + $url = "/h5/market/sylive2/stic?groupsId={$item['groupsId']}"; + if(!$item['ifBiz']){ + $note = $disk[$item['groupsLevel']+1] ? $disk[$item['groupsLevel']+1]:'门店'; + }else{ + $count = ''; + } $lists[] = [ 'title' => $item['groupsName'], - 'note' => $disk[$item['groupsLevel']+1] ? $disk[$item['groupsLevel']+1]:'下一级组员', + 'note' => $note, 'num' => $count, - 'url' => $item['groupsLevel']<3 ? "/h5/market/sylive2/stic?groupsId={$item['groupsId']}" : '', + 'url' => $url, ]; } } @@ -450,18 +464,22 @@ class Stic extends Admin{ $day_list[] = date('Y-m-d',$timeEnd - $i*24*60*60); } $this->data['day_list'] = $day_list; - $groups = [ - ['value'=>0,'title'=>'选择分组'], - ]; - $group_rows = $this->groups_model->select(['activityId'=>$this->a_id,'groupsLevel'=>1,'status'=>0],'','','','groupsId,groupsName'); - if($group_rows){ - foreach ($group_rows as $item) { - $groups[] = [ - 'value' => $item['groupsId'], - 'title' => $item['groupsName'] - ]; + $groups = []; + $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]); + if(!$group_user['bizId']){ + $disk = $this->sylive2_entity->level_disk($this->a_id); + if($disk){ + foreach ($disk as $key=>$item) { + $groups[] = [ + 'value' => $key, + 'type' => 'level', + 'title' => $item.'排名' + ]; + } } } + $groups[] = ['value'=>'','type'=>'biz','title'=>'门店排名']; + $groups[] = ['value'=>'','type'=>'user','title'=>'顾问排名']; $this->data['groups'] = $groups; //微信分享 $wx_info = $this->share_info($row); @@ -475,7 +493,6 @@ class Stic extends Admin{ 'browse' => 'browse', 'subscribe' => 'subscribe', 'order' => 'orderTotal','watch' => 'watch' ]; $params = $this->input->get(); -// $title = $params['gtype']=='gw' ? '顾问' : '门店'; $title = ''; $title_arr = [ 'browse' => $title.'浏览排行', @@ -486,31 +503,55 @@ class Stic extends Admin{ $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]); $page = $params['page'] ? intval($params['page']) : 1; $size = 20; - if(strtotime($params['day'])){//根据日期排行 + if(strtotime($params['day']) || $params['itemId']){//根据日期排行 $kpi = $params['kpi']; - $select = "bizId,count(id) as t"; + $tagId = 0; $where = [ 'activityId' => $this->a_id, - 'bizId>' => 0, 'status' => 0, - 'day' => date('Y-m-d',strtotime($params['day'])), 'kpi' => $kpi ]; - $params['groupIds'] && $where['levelId1'] = $params['groupIds']; - $data = $this->sylive2_data_entity->top_kpidata('bizId',$where,'t desc,id desc',$page,$size,$select,$group_user['bizId']); + if($params['type']=='level'){ + $group_by = "levelId{$params['value']}"; + $select = "{$group_by} as tagId,count(id) as t"; + $where["$group_by>"] = 0; + }elseif($params['type']=='biz'){ + $group_by = 'bizId'; + $select = "bizId as tagId,count(id) as t"; + $where["$group_by>"] = 0; + $tagId = $group_user['bizId']; + }else{ + $group_by = 'cfUserId'; + $select = "cfUserId as tagId,count(id) as t"; + $where["$group_by>"] = 0; + $tagId = $group_user['userId']; + } + strtotime($params['day']) && $where['day'] = date('Y-m-d',strtotime($params['day'])); + $params['itemId'] && $where["itemId"] = $params['itemId']; + $data = $this->sylive2_data_entity->top_kpidata($group_by,$where,'t desc,id desc',$page,$size,$select,$tagId); }else{ $kpi = $map_kpi_biz[$params['kpi']]; - $select = "bizId,sum({$kpi}) as t"; $where = [ 'activityId' => $this->a_id, - 'bizId>' => 0, 'status' => 0 ]; - $params['groupIds'] && $where['levelId1'] = $params['groupIds']; - $data = $this->sylive2_data_entity->top_groups_user('bizId',$where,'t desc,groupsUserId desc',$page,$size,$select,$params['kpi'],$group_user['bizId']); + if($params['type']=='level'){ + $group_by = "levelId{$params['value']}"; + $select = "{$group_by} as tagId,sum({$kpi}) as t"; + $where["$group_by>"] = 0; + }elseif($params['type']=='biz'){ + $group_by = 'bizId'; + $select = "bizId as tagId,sum({$kpi}) as t"; + $where["$group_by>"] = 0; + }else{ + $group_by = 'userId'; + $select = "userId as tagId,sum({$kpi}) as t"; + $where["$group_by>"] = 0; + } + $data = $this->sylive2_data_entity->top_groups_user($group_by,$where,'t desc,groupsUserId desc',$page,$size,$select,$params['kpi'],$group_user['bizId']); } $data['title'] = $title_arr[$params['kpi']]; - $data['url'] = "/h5/market/sylive2/stic/rank?type={$params['kpi']}&day={$params['day']}>ype={$params['gtype']}&show_day=1"; + $data['url'] = "/h5/market/sylive2/stic/rank?kpi={$params['kpi']}&day={$params['day']}&index={$params['index']}&show_day=1"; $this->show_json($data,200); } @@ -526,8 +567,33 @@ class Stic extends Admin{ for($i=0;$i<8;$i++){ $day_list[] = date('Y-m-d',$timeEnd - $i*24*60*60); } + $group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid]); + if(!$group_user['bizId']){ + $disk = $this->sylive2_entity->level_disk($this->a_id); + if($disk){ + foreach ($disk as $key=>$item) { + $groups[] = [ + 'value' => $key, + 'type' => 'level', + 'title' => $item.'排名' + ]; + } + } + } + $goods = []; + if($params['kpi']=='order'){ + $where = [ + 'activityId' => $this->a_id, + 'status' => 0 + ]; + $goods = $this->market_sylive_items_model->select($where,'sort desc,itemId desc',0,0,'itemId,title'); + } + $groups[] = ['value'=>'','type'=>'biz','title'=>'门店排名']; + $groups[] = ['value'=>'','type'=>'user','title'=>'顾问排名']; + $this->data['groups'] = $groups; $this->data['day_list'] = $day_list; $this->data['params'] = $params; + $this->data['goods'] = $goods; //微信分享 $wx_info = $this->share_info($row); $this->data['sign_package'] = $wx_info['sign_package']; diff --git a/home/views/h5/market/sylive2/act/share.php b/home/views/h5/market/sylive2/act/share.php index b38963c3..3e08d095 100644 --- a/home/views/h5/market/sylive2/act/share.php +++ b/home/views/h5/market/sylive2/act/share.php @@ -2,9 +2,9 @@
-
+
-
+
@@ -85,7 +85,7 @@ let that = this let swiper = new Swiper('.p-swiper .swiper-container', { //loop: true, - //autoHeight: true, + autoHeight: true, pagination: { el: '.swiper-pagination', type: 'fraction', diff --git a/home/views/h5/market/sylive2/header.php b/home/views/h5/market/sylive2/header.php index 35367073..e6e971ed 100644 --- a/home/views/h5/market/sylive2/header.php +++ b/home/views/h5/market/sylive2/header.php @@ -7,8 +7,8 @@ content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <?=$_title?> + - diff --git a/home/views/h5/market/sylive2/item/detail.php b/home/views/h5/market/sylive2/item/detail.php index fa956b08..7a978386 100644 --- a/home/views/h5/market/sylive2/item/detail.php +++ b/home/views/h5/market/sylive2/item/detail.php @@ -89,7 +89,7 @@ - 《{{info.protocolTitle}}》 + 《{{info.protocolTitle}}》
@@ -273,7 +273,7 @@ } else { //按钮倒计时 var that = this - $.post('/h5/market/sylive/item/get_code',{'mobile':that.telPhone},function (response){ + $.post('/h5/market/sylive2/item/get_code',{'mobile':that.telPhone,'a_id':that.info.a_id},function (response){ mDialog.msg({ duration: 250, pause: 2000, @@ -335,7 +335,7 @@ mDialog.msg({ duration: 250, pause: 2000, - content: "请阅读并同意《关于用户门票须知》" + content: "请阅读并同意《"+this.protocolTitle+"》" }); }else{ if(that.isSubmit){ @@ -353,7 +353,7 @@ 'city' : that.city, 'biz' : that.biz } - $.post('/h5/market/sylive/item/post_pay',params,function (res){ + $.post('/h5/market/sylive2/item/post_pay',params,function (res){ that.isSubmiting = false if(res.code==200){ that.isShowReg = false @@ -437,7 +437,7 @@ pause: 2000, content: '支付成功', onClose:function(){ - window.location = "/h5/market/sylive/ucenter?skey="; + window.location = "/h5/market/sylive2/ucenter/orders?skey="; } }); } @@ -466,7 +466,7 @@ 'id':this.oid } var that = this; - $.post('/h5/market/sylive/ucenter/edit_address',params,function (res){ + $.post('/h5/market/sylive2/ucenter/edit_address',params,function (res){ that.isSubmiting = false if(res.code==200){ mDialog.msg({ @@ -474,7 +474,7 @@ pause: 2000, content: res.msg, onClose:function(){ - window.location = "/h5/market/sylive/ucenter?skey="; + window.location = "/h5/market/sylive2/ucenter?skey="; } }); }else{ @@ -498,7 +498,7 @@ vm.city_arr = vm.biz_arr = {} vm.biz = vm.city = '' if (nv != '') { - $.get('/h5/market/sylive/item/biz_info',{'type':'city','p_name':vm.province},function (res){ + $.get('/h5/market/sylive2/item/biz_info',{'type':'city','p_name':vm.province},function (res){ vm.city_arr = res.data.lists },'json') } @@ -508,7 +508,7 @@ vm.biz_arr = {}; vm.biz = '' if (nv != '') { - $.get('/h5/market/sylive/item/biz_info',{'type':'biz','p_name':vm.province,'c_name':vm.city},function (res){ + $.get('/h5/market/sylive2/item/biz_info',{'type':'biz','p_name':vm.province,'c_name':vm.city},function (res){ vm.biz_arr = res.data.lists },'json') } @@ -516,5 +516,5 @@ } }) -load->view('h5/market/sylive/share_script')?> +load->view('h5/market/sylive2/share_script')?> \ No newline at end of file diff --git a/home/views/h5/market/sylive2/stic/rank.php b/home/views/h5/market/sylive2/stic/rank.php index b6800913..87dcda80 100644 --- a/home/views/h5/market/sylive2/stic/rank.php +++ b/home/views/h5/market/sylive2/stic/rank.php @@ -9,6 +9,15 @@ + +
+
+
@@ -44,6 +53,11 @@ list:[], checkDate:'', day_list : , + groups:, + index:, + kpi:'', + goodsId:0, + goodsList: , }, created(){ @@ -71,10 +85,14 @@ let that=this; if (!that.isNoData && !that.isDataEnd && !that.loading) { that.loading = true; + var type = this.groups[this.index]['type'] + var value = this.groups[this.index]['value'] var params = { - 'kpi':'', + 'kpi':'', 'day':that.checkDate, - 'gtype':'', + 'type':type, + 'value':value, + 'itemId':that.goodsId, 'page':that.page } //请求接口 @@ -102,6 +120,26 @@ this.list = []; this.getMoreList(); }, + changeGroup(e){ + this.index = e.target.value; + this.loading = false; + this.isDataEnd = false; + this.isNoData = false; + this.page = 1; + this.list = []; + this.getMoreList(); + }, + changegoods(e){ + if(this.goodsId != e.target.value){; + this.goodsId = e.target.value + this.loading = false; + this.isDataEnd = false; + this.isNoData = false; + this.page = 1; + this.list = []; + this.getMoreList() + } + } }, }) diff --git a/home/views/h5/market/sylive2/stic/ranking.php b/home/views/h5/market/sylive2/stic/ranking.php index d6ab112c..6fb3e8d0 100644 --- a/home/views/h5/market/sylive2/stic/ranking.php +++ b/home/views/h5/market/sylive2/stic/ranking.php @@ -24,7 +24,7 @@
- + - + - +