zhaojs
2023-07-12 f2255b1dacd4df89eb7565fcfb3c093a23bcfb32
application/api/controller/Activity.php
@@ -175,6 +175,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 +205,34 @@
        $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);
        $data = [
            'hascount' => $res
        ];
        $this->success('获取成功',$data);
    }
    /**
     * 获取排名
     */
    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);
    }
}