application/api/controller/Activity.php
@@ -7,6 +7,8 @@ use app\common\model\FqbCate; use app\api\logic\taoke\device\Jd as LogicJd; use app\api\logic\ActivityInfo as ActInfo; header("Access-Control-Allow-Origin:*"); class Activity extends Api { @@ -173,4 +175,18 @@ $this->success('获取成功',$list); } /** * 参加活动 */ public function attendAct() { $actid=request()->param('actid'); if(empty($actid)) $this->error('参数错误'); $actInfo=new ActInfo(); $user = $this->auth->getUser(); $res=$actInfo->attendAct($actid,$user->id); $res?$this->success('成功',$res): $this->error('活动异常');; } }