Przeglądaj źródła

更新一些报错

sandm 1 rok temu
rodzic
commit
056d10c0f4

+ 5 - 5
app/Admin/Controllers/Recruit/RecruitController.php

@@ -1061,7 +1061,7 @@ class RecruitController extends Controller
             ];
             $info->identification = json_decode($info->identification);
             $photo_data = [];
-            if(is_array($info->identification)){
+            if(is_array($info->identification) && count($info->identification) > 0){
                 foreach ($info->identification as $k => $v) {
                     if($v->status){
                         $photo_data[] = [
@@ -1080,7 +1080,7 @@ class RecruitController extends Controller
             ];
             $info->household_register = json_decode($info->household_register);
             $photo_data = [];
-            if(is_array($info->household_register)){
+            if(is_array($info->household_register)  && count($info->household_register) > 0){
                 foreach ($info->household_register as $k => $v) {
                     if($v->status){
                         $photo_data[] = [
@@ -1099,7 +1099,7 @@ class RecruitController extends Controller
             ];
             $info->education_certification = json_decode($info->education_certification);
             $photo_data = [];
-            if(is_array($info->education_certification)){
+            if(is_array($info->education_certification)  && count($info->education_certification) > 0){
                 foreach ($info->education_certification as $k => $v) {
                     if($v->status){
                         $photo_data[] = [
@@ -1135,7 +1135,7 @@ class RecruitController extends Controller
 //            ];
             $info->chengxin = json_decode($info->chengxin);
             $photo_data = [];
-            if(is_array($info->chengxin)){
+            if(is_array($info->chengxin) && count($info->chengxin) > 0){
                 foreach ($info->chengxin as $k => $v) {
                     if($v->status){
                         $photo_data[] = [
@@ -1156,7 +1156,7 @@ class RecruitController extends Controller
 
             $info->manage = json_decode($info->manage);
             $photo_data = [];
-            if(is_array($info->manage)){
+            if(is_array($info->manage) && count($info->manage) > 0){
                 foreach ($info->manage as $k => $v) {
                     if($v->status){
                         $photo_data[] = [

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

@@ -2038,6 +2038,17 @@ class IndexController extends WebBaseController
 //                }
 //            }
 //            $info->family_planning = json_encode($family_planning);
+            //失信查询 情况
+            $chengxin = $request->input('chengxin');
+            if(is_array($chengxin)){
+                //删除掉没有成功返回路径的图片
+                foreach ($chengxin as $k => $v){
+                    if(!array_key_exists('response',$v)){
+                        unset($chengxin[$k]);
+                    }
+                }
+            }
+            $info->chengxin = json_encode($chengxin);
             //综治
             $manage = $request->input('manage');
             if(is_array($manage)){
@@ -2100,6 +2111,17 @@ class IndexController extends WebBaseController
 //                }
 //            }
 //            $data['family_planning'] = json_encode($family_planning);
+            //失信查询 情况
+            $chengxin = $request->input('chengxin');
+            if(is_array($chengxin)){
+                //删除掉没有成功返回路径的图片
+                foreach ($chengxin as $k => $v){
+                    if(!array_key_exists('response',$v)){
+                        unset($chengxin[$k]);
+                    }
+                }
+            }
+            $data['chengxin'] = json_encode($chengxin);
             //综治
             $manage = $request->input('manage');
             if(is_array($manage)){