瀏覽代碼

Merge branch 'master' of http://59.57.98.130:3000/jjhc/jucai

sandm 2 年之前
父節點
當前提交
34a489b6e8
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      app/Http/Controllers/Web/Content/ArticleController.php

+ 2 - 3
app/Http/Controllers/Web/Content/ArticleController.php

@@ -32,12 +32,11 @@ class ArticleController extends WebBaseController
         $this->navigationService      = $navigationService;
     }
 
-    public function index(Request $request, $id = '1', $num = '8', $focus = '3', $recommend = '4', $other_num = '5')
+    public function index(Request $request, $id = '57', $num = '8', $focus = '3', $recommend = '4', $other_num = '5')
     {
         $key       = $request->input('key');
         $categorys = $this->articleCategoryService->getChildCategorys($id, $num);
-        $search_id = '';
-        if ($categorys) {
+        if (!$categorys->isEmpty()) {
             $search_id          = $categorys[0]->id;
             $search_where       = [];
             $search_where['id'] = $search_id;