linwu 2 жил өмнө
parent
commit
0b851b4afe

+ 3 - 3
app/Http/Controllers/Web/HomeController.php

@@ -268,9 +268,9 @@ class HomeController extends WebBaseController
         }
         }
 
 
         //人才新闻
         //人才新闻
-        $ad_pic_where1[] = ['small_img', '<>', ''];
-        $ad_pic1         = Article::where($ad_pic_where1)->whereIn('type_id', [58, 59])->orderBy('list_order', 'asc')->orderBy('id', 'desc')->limit(1)->get();
-        $ad_pic1         = Article::where('id', 796)->get();
+//        $ad_pic_where1[] = ['small_img', '<>', ''];
+//        $ad_pic1         = Article::where($ad_pic_where1)->whereIn('type_id', [58, 59])->orderBy('list_order', 'asc')->orderBy('id', 'desc')->limit(1)->get();
+        $ad_pic1         = Article::whereNotNull('small_img')->orderBy('list_order', 'asc')->orderBy('id', 'desc')->limit(1)->get();
 
 
         //人才疗休养活动
         //人才疗休养活动
         $ad_pic_where2[] = ['r_c_id', '!=', 0];
         $ad_pic_where2[] = ['r_c_id', '!=', 0];