| | |
| | | header("Access-Control-Allow-Origin:*"); |
| | | class Activity extends Api |
| | | { |
| | | protected $noNeedLogin = ['fqb_plat_cate','run_countRecruitAct']; |
| | | protected $noNeedLogin = ['fqb_plat_cate','run_countRecruitAct','test']; |
| | | protected $noNeedRight = '*'; |
| | | /** |
| | | * 获取疯抢榜 |
| | |
| | | $this->success('获取成功',$res); |
| | | } |
| | | |
| | | public function test() |
| | | { |
| | | $actInfo=new ActInfo(); |
| | | $res=$actInfo->updateRecruitCount(2); |
| | | } |
| | | |
| | | /** |
| | | * 招募活动计算 |
| | | */ |
| | |
| | | try{ |
| | | //查询进行中的招募活动 |
| | | $nowTime= date("Y-m-d H:i:s", time()); |
| | | $actList=Db::query('select id from t_activity_manage where act_status=1 and start_time<=? and end_time>=? and act_type=0 limit 1',[$nowTime,$nowTime]); |
| | | $actList=Db::query('select id,end_time from t_activity_manage where act_status=1 and start_time<=? and end_time>=? and act_type=0 limit 1',[$nowTime,$nowTime]); |
| | | if(empty($actList)) |
| | | {//没有进行中的活动,不用处理 |
| | | return true; |