|
@@ -25,4 +25,15 @@ class Category extends Base
|
|
|
|
|
|
$this->success('获取成功', $list);
|
|
|
}
|
|
|
+
|
|
|
+ // 查询所有分类
|
|
|
+ public function getCategoryList()
|
|
|
+ {
|
|
|
+ $categoryList = CategoryModel::field('id,pid,name,image')
|
|
|
+ ->order('weigh asc,id asc')
|
|
|
+ ->where('status',StatusEnum::ENABLED)
|
|
|
+ ->select();
|
|
|
+
|
|
|
+ $this->success('获取成功', $categoryList);
|
|
|
+ }
|
|
|
}
|