wzq hace 5 años
padre
commit
c62781aa18
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      app/Http/Controllers/V1/PostController.php

+ 4 - 1
app/Http/Controllers/V1/PostController.php

@@ -188,7 +188,10 @@ class PostController extends Controller
                             foreach($floor[$key + 1]['data'] as $item){
                                 if($item['type'] == 1){
                                     $postType = Post::where('id', $item['link_content_id'])->value('type');
-                                    if(!$postType) continue;
+                                    if(!$postType){
+                                        Log::info('banner类型为内容,未找到内容,被丢弃'.json_encode($item));
+                                        continue;
+                                    }
                                     $bannerData[] = array_merge($item, ['post_type' => $postType]);
                                 }else{
                                     $bannerData[] = $item;