From d6c722b7d7898b1ebbbaffa79e440be597b05373 Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Fri, 17 Mar 2023 23:36:25 +0800 Subject: [PATCH] edit-home-sylive --- home/controllers/h5/market/sylive2/Act.php | 10 ++++++++++ home/controllers/h5/market/sylive2/Customer.php | 5 ++++- home/controllers/h5/market/sylive2/Order.php | 5 +++++ home/controllers/h5/market/sylive2/Stic.php | 17 +++++++++++++++-- home/views/h5/market/sylive2/act/index.php | 13 ++++++++++--- home/views/h5/market/sylive2/nav_biz.php | 2 ++ 6 files changed, 46 insertions(+), 6 deletions(-) diff --git a/home/controllers/h5/market/sylive2/Act.php b/home/controllers/h5/market/sylive2/Act.php index 4cd02e8b..996e52ca 100644 --- a/home/controllers/h5/market/sylive2/Act.php +++ b/home/controllers/h5/market/sylive2/Act.php @@ -29,6 +29,7 @@ class Act extends Wx { public function index(){ $alert_code = $this->input->get('alert_code'); + $apt = $this->input->get('apt'); if (!$this->a_id) { throw new Hd_exception("参数错误", 400); } @@ -119,13 +120,19 @@ class Act extends Wx { $info['alert_code'] = $alert_code ? 1 : 0; $info['appoint_mobile'] = false; $info['is_appoint'] = false; + $auth_url = ''; if($jsondata['signBespeak']['status']){ $info['appoint_mobile'] = true; //判断是否已报名 $where = ['activityId'=>$this->a_id,'userId'=>$this->uid]; $appoint = $this->market_sylive_customer_model->count($where); $info['is_appoint'] = $appoint ? true : false; + if(!$user['nickname'] && !$user['headimg']) { + $auth_url = http_host_com('home') . "/h5/market/sylive2/act/userinfo?skey={$this->skey}&type=apt"; + } } + $info['auth_url'] = $auth_url; + $info['apt'] = $apt ? true : false; //是否弹窗报名 $info['appoint_title'] = $jsondata['signBespeak']['title'] ? $jsondata['signBespeak']['title'] : ''; $info['appoint_msg'] = $jsondata['signBespeak']['content'] ? $jsondata['signBespeak']['content'] : ''; $info['notice_color'] = $jsondata['barrageColor'] ? '#fff' : '#333'; @@ -462,6 +469,9 @@ class Act extends Wx { }elseif($type=='item'){ $my_url = http_host_com('home')."/h5/market/sylive2/item/detail?skey={$skey}&click=1"; redirect($my_url); + }elseif ($type=='apt'){ + $my_url = http_host_com('home')."/h5/market/sylive2/act?skey={$skey}&apt=1"; + 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/sylive2/Customer.php b/home/controllers/h5/market/sylive2/Customer.php index 6a6861b2..628ff40f 100644 --- a/home/controllers/h5/market/sylive2/Customer.php +++ b/home/controllers/h5/market/sylive2/Customer.php @@ -25,8 +25,11 @@ class Customer extends Admin $this->group_user = $this->groups_user_model->get(['activityId' => $this->a_id, 'userId' => $this->uid, 'status' => 0]); $this->data['is_biz'] = $this->group_user['bizId'] ? 1 : 0; if($this->group_user['bizId'] && $this->group_user['type']){ //店长 - $this->is_shop_manager = 1; + $this->data['is_shop_manager'] = $this->is_shop_manager = 1; + }else{ + $this->data['is_shop_manager'] = 0; } + } public function index() diff --git a/home/controllers/h5/market/sylive2/Order.php b/home/controllers/h5/market/sylive2/Order.php index 78b48aa7..ff3a6afb 100644 --- a/home/controllers/h5/market/sylive2/Order.php +++ b/home/controllers/h5/market/sylive2/Order.php @@ -22,6 +22,11 @@ class Order extends Admin $this->data['act_url'] = "/h5/market/sylive2/act?skey={$skey}"; $this->group_user = $this->groups_user_model->get(['activityId' => $this->a_id, 'userId' => $this->uid, 'status' => 0]); $this->data['is_biz'] = $this->group_user['bizId'] ? 1 : 0; + if($this->group_user['bizId'] && $this->group_user['type']){ //店长 + $this->data['is_shop_manager'] = $this->is_shop_manager = 1; + }else{ + $this->data['is_shop_manager'] = 0; + } } public function index() diff --git a/home/controllers/h5/market/sylive2/Stic.php b/home/controllers/h5/market/sylive2/Stic.php index b478c460..049f35ed 100644 --- a/home/controllers/h5/market/sylive2/Stic.php +++ b/home/controllers/h5/market/sylive2/Stic.php @@ -23,6 +23,11 @@ class Stic extends Admin{ $this->data['act_url'] = "/h5/market/sylive2/act?skey={$skey}"; $this->group_user = $this->groups_user_model->get(['activityId'=>$this->a_id,'userId'=>$this->uid,'status'=>0]); $this->data['is_biz'] = $this->group_user['bizId'] ? 1 : 0; + if($this->group_user['bizId'] && $this->group_user['type']){ //店长 + $this->data['is_shop_manager'] = $this->is_shop_manager = 1; + }else{ + $this->data['is_shop_manager'] = 0; + } } public function index(){ @@ -487,7 +492,11 @@ class Stic extends Admin{ $day_list = ['全部']; $timeEnd = strtotime($row['timeEnd']);//直播结束往前七天 for($i=0;$i<$diff_days;$i++){ - $day_list[] = date('Y-m-d',$timeEnd - $i*24*60*60); + if(time()< strtotime($row['timeEnd'])){ + $day_list[] = date('Y-m-d',time() - $i*24*60*60); + }else{ + $day_list[] = date('Y-m-d',$timeEnd - $i*24*60*60); + } } $this->data['day_list'] = $day_list; $groups = []; @@ -605,7 +614,11 @@ class Stic extends Admin{ $day_list = ['全部']; $timeEnd = strtotime($row['timeEnd']);//直播结束往前七天 for($i=0;$i<$diff_days;$i++){ - $day_list[] = date('Y-m-d',$timeEnd - $i*24*60*60); + if(time()< strtotime($row['timeEnd'])){ + $day_list[] = date('Y-m-d',time() - $i*24*60*60); + }else{ + $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']){ diff --git a/home/views/h5/market/sylive2/act/index.php b/home/views/h5/market/sylive2/act/index.php index 8ac85510..f4811ec1 100644 --- a/home/views/h5/market/sylive2/act/index.php +++ b/home/views/h5/market/sylive2/act/index.php @@ -121,7 +121,7 @@
-
预约直播
+
{{info.btn_text}}
@@ -193,7 +193,9 @@ if (this.info.alert_code) { mDialog.msg({content: '预约成功'}); } - + if (this.info.apt){ + this.msgisShowReg = true + } }, beforeDestroy() { this.notice1 = [] @@ -213,7 +215,11 @@ content:that.info.appoint_msg, } }else{ - that.msgisShowReg = true + if(that.info.auth_url){ + window.location.href = that.info.auth_url; + }else{ + that.msgisShowReg = true + } } }else{ this.goSubscribemsg() @@ -223,6 +229,7 @@ this.msgisShowCode = false }, goSubscribemsg:function (){ + var that = this if (that.info.subscribemsg == '已订阅直播') { mDialog.msg({content: that.info.subscribemsg}); } else { diff --git a/home/views/h5/market/sylive2/nav_biz.php b/home/views/h5/market/sylive2/nav_biz.php index 8699d414..0ec5c997 100644 --- a/home/views/h5/market/sylive2/nav_biz.php +++ b/home/views/h5/market/sylive2/nav_biz.php @@ -8,9 +8,11 @@ #
客户
+ # + #
订单