From 8dcfae4fff98fbbb19ff46bd9750f25bc56801a9 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期一, 31 七月 2023 10:42:20 +0800 Subject: [PATCH] Merge branch 'release/v1.1.5发布' --- application/api/controller/Activity.php | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 105 insertions(+), 1 deletions(-) diff --git a/application/api/controller/Activity.php b/application/api/controller/Activity.php index 317737e..a39bc4a 100644 --- a/application/api/controller/Activity.php +++ b/application/api/controller/Activity.php @@ -6,13 +6,14 @@ use app\api\logic\taoke\device\Haodanku; use app\common\model\FqbCate; use app\api\logic\taoke\device\Jd as LogicJd; +use app\api\logic\Banner as LogicBanner; use app\api\logic\ActivityInfo as ActInfo; header("Access-Control-Allow-Origin:*"); class Activity extends Api { - protected $noNeedLogin = ['fqb_plat_cate']; + protected $noNeedLogin = ['fqb_plat_cate','run_countRecruitAct','test']; protected $noNeedRight = '*'; /** * 鑾峰彇鐤姠姒� @@ -175,6 +176,22 @@ $this->success('鑾峰彇鎴愬姛',$list); } + + /** + * 鑾峰彇娲诲姩淇℃伅 + * + */ + public function getActInfo() + { + $actid=request()->param('actid'); + if(empty($actid)) $this->error('鍙傛暟閿欒'); + $actInfo=new ActInfo(); + $user = $this->auth->getUser(); + $res=$actInfo->getActInfo($actid,$user->id); + + $this->success('鑾峰彇鎴愬姛',$res); + } + /** * 鍙傚姞娲诲姩 */ @@ -189,4 +206,91 @@ $res?$this->success('鎴愬姛',$res): $this->error('娲诲姩寮傚父');; } + /** + * 鑾峰彇娲诲姩宸查個璇蜂汉鏁� + * + */ + public function getActRecruitCount() + { + $actid=request()->param('actid'); + if(empty($actid)) $this->error('鍙傛暟閿欒'); + $actInfo=new ActInfo(); + $user = $this->auth->getUser(); + $res=$actInfo->getActRecruitCount($actid,$user->id); + $this->success('鑾峰彇鎴愬姛',$res); + } + + /** + * 鑾峰彇鎺掑悕 + */ + public function getRankingList() + { + $actid=request()->param('actid'); + if(empty($actid)) $this->error('鍙傛暟閿欒'); + $actInfo=new ActInfo(); + $user = $this->auth->getUser(); + $res=$actInfo->getRankingList($actid,$user->id); + $this->success('鑾峰彇鎴愬姛',$res); + } + + public function test() + { + $actInfo=new ActInfo(); + $res=$actInfo->updateRecruitCount(2); + } + + /** + * 鎷涘嫙娲诲姩璁$畻 + */ + public function run_countRecruitAct() + { + $actInfo=new ActInfo(); + $res=$actInfo->run_countRecruitAct(); + $this->success('鎵ц瀹屾垚',$res); + } + /** + * 鑾峰彇閭�璇风爜 + */ + public function getInviteUrl() + { + $user = $this->auth->getUser(); + $this->success('鑾峰彇鎴愬姛',$user->invitation_code); + } + + + /** + * 鑾峰彇鑷畾涔夊脊绐� + * + */ + public function getCustomizePopup() + { + $LogicBanner = new LogicBanner(); + $list = $LogicBanner->getList('20,21'); + if(!$list||$list['customizePop']==null||count($list['customizePop'])==0) + { + $this->success('鑾峰彇鎴愬姛',[]); + } + $user = $this->auth->getUser(); + $actInfo=new ActInfo(); + foreach ($list['customizePop'] as $vaule) { + $paraJson=json_decode($vaule->note); + $isPop=false; + switch($paraJson->poptype) + { + case 'freebuy'://0鍏冭喘寮圭獥 + $isPop=$actInfo->popupcus_freebuy($user); + break; + default: + break; + } + if($isPop) + { + $this->success('鑾峰彇鎴愬姛',['haspop'=>true,'info'=>$vaule]); + break; + } + } + $this->success('鑾峰彇鎴愬姛',['haspop'=>false]); + } + + } \ No newline at end of file -- Gitblit v1.9.3