Browse Source

重新优化暂存逻辑

sandm 1 year ago
parent
commit
2dd22654fb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/Http/Controllers/Web/Recruit/IndexController.php

+ 3 - 0
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -810,6 +810,9 @@ class IndexController extends WebBaseController
         }
 
         $data = $request->only('realname','sex','birthday','avatar','nation','native_place','political_affiliation','titles','join_time','work','house_register','education','school','degree','pro','address','card','mobile','email','concat_name','concat_mobile','resume','post_id','adjust','remark');
+        if(!array_key_exists('post_id',$data)){
+            return response()->json(['status' => 0,'msg' => '请选择报考岗位']);
+        }
         $post_info = RecruitPost::where('id',$data['post_id'])->where('recruit_id',$recruit_id)->first();
         if(!$post_info['status'] || $post_info['deleted_at'] != null){
             return response()->json(['status' => 0,'msg' => '该岗位已失效']);