qiushang 2 天之前
父節點
當前提交
20b408e335
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/Http/Home/HelpController.php

+ 3 - 3
app/Http/Home/HelpController.php

@@ -27,7 +27,7 @@ class HelpController extends HttpBaseController
             $productId = $row->product_id;
             unset($row->id);
 
-            $productInfo = DB::table('product')->select(['id', 'title', 'logo'])->where('id', $productId)->where('is_delete', 0)->first();
+            $productInfo = DB::table('product')->select(['id', 'title', 'logo'])->where('id', $productId)->first();
 
             $data[] = [
                 'product' => $productInfo,
@@ -47,7 +47,7 @@ class HelpController extends HttpBaseController
             $productId = $row->product_id;
             unset($row->id);
 
-            $productInfo = DB::table('product')->select(['id', 'title', 'logo'])->where('id', $productId)->where('is_delete', 0)->first();
+            $productInfo = DB::table('product')->select(['id', 'title', 'logo'])->where('id', $productId)->first();
 
             $data[] = [
                 'product' => $productInfo,
@@ -104,7 +104,7 @@ class HelpController extends HttpBaseController
 
     private function getNewsCategory()
     {
-        return DB::table('news_category')->select(['id', 'mid', 'name', 'product_id'])->get();
+        return DB::table('news_category')->select(['id', 'mid', 'name', 'product_id'])->where('is_delete', 0)->get();
     }
 
     private function getNewsList($categoryId)