zhaojs
2023-08-01 cc6247528b559cf6a9468591bb889bb58dc14199
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace app\api\logic;
 
use app\common\logic\Basic as BasicLogic;
use app\api\model\Category as ModelCategory;
 
/**
 * 分类管理
 */
class Category extends BasicLogic
{
 
 
    public function __construct()
    {
        parent::__construct();
 
        $this->model = new ModelCategory();
    }
 
    /**
     * 获取分类列表
     *
     * @return void
     */
    public function getList($ctype,$parentId)
    {
        $list = $this->model->field('cid,cname,ctype,cpic')->where(['ctype'=>$ctype,'parent_id'=>$parentId])->select();
        return empty($list) ? [] : $list;
    }
 
 
}