diff --git a/common/libraries/market/Sylive_data_entity.php b/common/libraries/market/Sylive_data_entity.php index 091e3332..eab88180 100644 --- a/common/libraries/market/Sylive_data_entity.php +++ b/common/libraries/market/Sylive_data_entity.php @@ -273,7 +273,7 @@ class Sylive_data_entity{ $select = "bizId,userId,{$filed} as t"; $total = $this->ci->act_user_model->count($where); if($total){ - $rows = $this->ci->act_user_model->select($where,"t desc",$page,$size,$select); + $rows = $this->ci->act_user_model->select($where,"t desc,id desc",$page,$size,$select); $user_ids = implode(',',array_column($rows,'userId')); $user_rows = []; if($user_ids){ @@ -401,11 +401,16 @@ class Sylive_data_entity{ if($total){ $rows = $this->ci->mdSytActivityKpiData->select_groupby($groupby, $where, $order, $page, $page_size, $select); $org_rows = []; - if($groupby=='cfUserId'){ + 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'); } + $biz_ids = implode(',',array_column($rows,'teamId2')); + $biz_rows = []; + if($biz_ids){ + $biz_rows = $this->ci->market_sylive_organization_model->map('organizationId','',["organizationId in ($biz_ids)"=>null],'','','','organizationId,organizationName'); + } }else{ $team_ids = implode(',',array_column($rows,'teamId2')); if($team_ids){ @@ -415,16 +420,19 @@ class Sylive_data_entity{ $num_tip = $where['kpi'] == 'order' ? '单' : '人'; $start = $page>1 ? ($page-1)*$page_size : 0; foreach ($rows as $key=>$val) { + $biz_name = ''; if($groupby=='cfUserId'){ $org = $org_rows[$val['cfUserId']] ? $org_rows[$val['cfUserId']][0] : []; $tip = $teamId==$val['cfUserId'] ? '本人' : ''; + $biz = $biz_rows[$val['teamId2']] ? $biz_rows[$val['teamId2']][0] : []; + $biz_name = $biz['organizationName'] ? "({$biz['organizationName']})" : ''; }else{ $org = $org_rows[$val['teamId2']] ? $org_rows[$val['teamId2']][0] : []; $tip = $teamId==$val['teamId2'] ? '我的团队' : ''; } $lists[] = [ 'ranking' => $start+$key+1, - 'name' => $org['name'], + 'name' => $org['name'].$biz_name, 'num' => $val['t'].$num_tip, 'tip' => $tip, ]; diff --git a/home/controllers/h5/market/sylive/Act.php b/home/controllers/h5/market/sylive/Act.php index b78e0333..afefa8f8 100644 --- a/home/controllers/h5/market/sylive/Act.php +++ b/home/controllers/h5/market/sylive/Act.php @@ -114,6 +114,7 @@ class Act extends Wx { }else{ $info['live_url'] = "https://live.haodian.cn/watch/{$row['channelId']}?userid={$userid}&ts={$ts}&sign={$sign}"; } + $info['my_url'] = http_host_com('home')."/h5/market/sylive/act/userinfo?skey={$skey}&type=my"; //微信分享 $wx_info = $this->share_info($row); $info['show_code'] = $is_show_code ? 1 : 0; @@ -447,6 +448,9 @@ class Act extends Wx { . '&s_time=' . $row['timeStart']); $subscribemsg = "https://mp.weixin.qq.com/mp/subscribemsg?action=get_confirm&appid={$config['appid']}&scene=0&template_id={$this->template_id}&redirect_url={$sub_redirect_url}&reserved=test#wechat_redirect"; redirect($subscribemsg); + }elseif($type=='my'){ //跳转我的 + $my_url = http_host_com('home')."/h5/market/sylive/ucenter?skey={$skey}"; + redirect($my_url); }else{ $user = $this->user_model->get(['userId'=>$this->uid],'unionid,nickname,headimg'); $userid = $user['unionid'] ? $user['unionid'] : $this->uid; diff --git a/home/controllers/h5/market/sylive/Item.php b/home/controllers/h5/market/sylive/Item.php index 6a4b51b4..9d0add31 100644 --- a/home/controllers/h5/market/sylive/Item.php +++ b/home/controllers/h5/market/sylive/Item.php @@ -86,7 +86,8 @@ class Item extends Wx{ 'need_shop' => $need_shop, 'live_url' => $live_url, 'a_id' => $a_id, - 'ifAddress' => $row['ifAddress'] + 'ifAddress' => $row['ifAddress'], + 'protocolTitle' => $act['protocolTitle'] ]; $this->data['province_arr'] = $province_arr; $this->data['city_arr'] = $city_arr; diff --git a/home/controllers/h5/market/sylive/Test.php b/home/controllers/h5/market/sylive/Test.php new file mode 100644 index 00000000..7c7c7ecc --- /dev/null +++ b/home/controllers/h5/market/sylive/Test.php @@ -0,0 +1,17 @@ +share_info(); + $this->data['sign_package'] = $wx_info['sign_package']; + $this->show_view('h5/market/sylive/act/test'); + } +} \ No newline at end of file diff --git a/home/controllers/h5/market/sylive/Ucenter.php b/home/controllers/h5/market/sylive/Ucenter.php index 244d3fff..b8dc3ee7 100644 --- a/home/controllers/h5/market/sylive/Ucenter.php +++ b/home/controllers/h5/market/sylive/Ucenter.php @@ -141,7 +141,8 @@ class Ucenter extends Wx{ 'introTitle' => '权益说明', 'content' => $item['descrip'] ? $item['descrip'] : '', 'order' => $order, - 'skey' => $this->data['skey'] + 'skey' => $this->data['skey'], + 'ifAddress' => $item['ifAddress'] ]; $this->data['info'] = $info; $this->show_view('h5/market/sylive/ucenter/detail'); diff --git a/home/views/h5/market/sylive/act/index.php b/home/views/h5/market/sylive/act/index.php index a0dd4055..63cb5796 100644 --- a/home/views/h5/market/sylive/act/index.php +++ b/home/views/h5/market/sylive/act/index.php @@ -19,7 +19,10 @@ 活动已结束 - load->view('h5/market/sylive/nav_my') ?> + + +
我的
+
diff --git a/home/views/h5/market/sylive/act/test.php b/home/views/h5/market/sylive/act/test.php new file mode 100644 index 00000000..90ccaea3 --- /dev/null +++ b/home/views/h5/market/sylive/act/test.php @@ -0,0 +1,75 @@ + +
+
+
+ + + + +
+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/home/views/h5/market/sylive/item/detail.php b/home/views/h5/market/sylive/item/detail.php index 5e10e706..fa956b08 100644 --- a/home/views/h5/market/sylive/item/detail.php +++ b/home/views/h5/market/sylive/item/detail.php @@ -89,7 +89,7 @@ - 《关于用户门票须知》 + 《{{info.protocolTitle}}》
@@ -390,7 +390,7 @@ this.isShowSuccess = false }, showSuccess: function (){ - if(this.info.ifAddress){ //需要填写收货地址 + if(this.info.ifAddress>0){ //需要填写收货地址 this.isShowSuccess = true; //选择省市初始化 setTimeout(function () { diff --git a/home/views/h5/market/sylive/ucenter/detail.php b/home/views/h5/market/sylive/ucenter/detail.php index f27d118e..eebccf2b 100644 --- a/home/views/h5/market/sylive/ucenter/detail.php +++ b/home/views/h5/market/sylive/ucenter/detail.php @@ -12,8 +12,10 @@
{{info.order.uname}}·{{info.order.utel}}
-
{{show_address}}
-
(完善收货地址)
+