瀏覽代碼

更新超过审核时间无法继续报名

sandm 2 年之前
父節點
當前提交
c23169374c
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      app/Http/Controllers/Web/Recruit/IndexController.php

+ 8 - 7
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -716,16 +716,17 @@ class IndexController extends WebBaseController
         $time = time();
         $appoint_info = RecruitAppointInfo::where('uid',$uid)->where('recruit_id',$recruit_id)->first();
         if(($time < strtotime($recruit['apply_start']) || strtotime($recruit['apply_end']) < $time)){//过了招考时间
-            if($appoint_info){
-                //如果有报名记录,先查询首次报名是什么时候
-                $first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->orderBy('created_at','asc')->first();
-                if(!$first_post){//没有记录代表只是暂存
-                    return response()->json(['status' => 0,'msg' => '抱歉,该项目已过报名时间!']);
-                }
-            }
             if(!$appoint_info){
                 return response()->json(['status' => 0,'msg' => '抱歉,该项目已过报名时间!']);
             }
+            if(($time < strtotime($recruit['audit_start']) || strtotime($recruit['audit_start']) < $time)){//过了审核时间
+                return response()->json(['status' => 0,'msg' => '抱歉,该项目已过审核时间,无法继续报名!']);
+            }
+            //如果有报名记录,先查询首次报名是什么时候
+            $first_post = RecruitAppointLog::where('type',3)->where('uid',$uid)->orderBy('created_at','asc')->first();
+            if(!$first_post){//没有记录代表只是暂存
+                return response()->json(['status' => 0,'msg' => '抱歉,该项目已过报名时间!']);
+            }
         }
 
         //基础信息的检查