diff --git a/home/controllers/h5/market/sylive2/Act.php b/home/controllers/h5/market/sylive2/Act.php index af4fec76..a74e3399 100644 --- a/home/controllers/h5/market/sylive2/Act.php +++ b/home/controllers/h5/market/sylive2/Act.php @@ -43,11 +43,11 @@ class Act extends Wx { 'icon' => build_qiniu_image_url($val['icon']) ]; if($val['urlType']=='miniProgram'){ - $temp['type'] = 1; + $temp['type'] = 2; $temp['wechat_ghid'] = $val['miniProgramId']; $temp['wechat_path'] = $val['url']; }else{ - $temp['type'] = 2; + $temp['type'] = 1; $temp['url'] = $val['url']; } $bottoms[] = $temp; diff --git a/home/controllers/h5/market/sylive2/User.php b/home/controllers/h5/market/sylive2/User.php index 8f639b16..5166af45 100644 --- a/home/controllers/h5/market/sylive2/User.php +++ b/home/controllers/h5/market/sylive2/User.php @@ -92,7 +92,12 @@ class User extends Admin } //所有分组添加顾问 $filed = 'activityId,groupsId,bizId,levelId1,levelId2,levelId3,userFrom'; - $admin_lists = $this->groups_user_model->select(['userId'=>$this->uid],'groupsUserId desc',0,0,$filed); + $day = date('Y-m-d H:i:s'); + $where = [ + 'userId' => $this->uid, + "activityId in (select activityId from lc_market_sylive_activity where timeEnd>'{$day}' and status=0)" => null + ]; + $admin_lists = $this->groups_user_model->select($where,'groupsUserId desc',0,0,$filed); if($admin_lists){ foreach ($admin_lists as $key => $val) { $add_data[] = [ @@ -153,6 +158,14 @@ class User extends Admin $this->show_json('', 400, '参数错误'); } $this->user_model->update(['status' => $status], ['userId' => $userId]); + if(!$status){ + $day = date('Y-m-d H:i:s'); + $where = [ + 'userId' => $userId, + "activityId in (select activityId from lc_market_sylive_activity where timeEnd>'{$day}' and status=0)" => null + ]; + $this->groups_user_model->delete($where); + } $this->show_json('', 200, '操作成功'); } } \ No newline at end of file