正在显示
1 个修改的文件
包含
8 行增加
和
0 行删除
| @@ -58,6 +58,14 @@ class AiProductLogic extends BaseLogic | @@ -58,6 +58,14 @@ class AiProductLogic extends BaseLogic | ||
| 58 | $map['project_id'] = $this->user['project_id']; | 58 | $map['project_id'] = $this->user['project_id']; |
| 59 | $productCateModel = new Category(); | 59 | $productCateModel = new Category(); |
| 60 | $list = $productCateModel->list($map,'created_at',['id','project_id','title']); | 60 | $list = $productCateModel->list($map,'created_at',['id','project_id','title']); |
| 61 | + $menu = []; | ||
| 62 | + foreach ($list as $k => $v){ | ||
| 63 | + $v = (array)$v; | ||
| 64 | + if ($v['pid'] == 0) { | ||
| 65 | + $v['sub'] = _get_child($v['id'], $list); | ||
| 66 | + $menu[] = $v; | ||
| 67 | + } | ||
| 68 | + } | ||
| 61 | return $this->success($list); | 69 | return $this->success($list); |
| 62 | } | 70 | } |
| 63 | } | 71 | } |
-
请 注册 或 登录 后发表评论