wzq 5 years ago
parent
commit
276d5b96aa
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/Repositories/BannerRepository.php

+ 5 - 0
app/Repositories/BannerRepository.php

@@ -18,7 +18,12 @@ class BannerRepository
     public function bannerData($request)
     {
         $ids = explode(",", $request['ids']);
+        $where = [];
+        $where[] = ['is_open', 1];
+        $where[] = ['use_background', 1];
         return $this->banner
+            ->select('image', 'type', 'link_content_id')
+            ->where($where)
             ->whereIn('id', $ids)
             ->get();
     }