Bladeren bron

微信小程序
心理评估分类改为二级菜单

shawdonH 2 dagen geleden
bovenliggende
commit
b739ab9f99

+ 5 - 1
app/Http/Controllers/Api/V1/Mentality/ScaleCategoryController.php

@@ -20,9 +20,13 @@ class ScaleCategoryController extends BaseController
         $sort       = '`rank` desc';
         $page       = request('page', 1);
         $limit      = request('limit', 20);
-
+        $conditions['enable'] = 1;
         return ScaleCategoryFacade::getList($conditions, $fields, $sort, $page, $limit);
     }
+    public function tree()
+    {
+        return ScaleCategoryFacade::tree();
+    }
 
     /**
      * Store a newly created resource in storage.

+ 1 - 0
app/Http/Controllers/Api/V1/Mentality/ScaleController.php

@@ -22,6 +22,7 @@ class ScaleController extends BaseController
 
         $conditions = [
             'category_id'   => request('category_id'),
+            'second_id'    => request('second_id'),
             'search'        => request('search'),
             'comment_tag'   => $commentTag
         ];