正在显示
2 个修改的文件
包含
8 行增加
和
9 行删除
| @@ -20,15 +20,13 @@ class DeptController extends BaseController | @@ -20,15 +20,13 @@ class DeptController extends BaseController | ||
| 20 | 20 | ||
| 21 | public function list(DeptLogic $logic) | 21 | public function list(DeptLogic $logic) |
| 22 | { | 22 | { |
| 23 | - var_dump(1111111); | ||
| 24 | - die(); | ||
| 25 | -// $map = []; | ||
| 26 | -// if(!empty($this->param['search'])){ | ||
| 27 | -// $map[] = ['title', 'like', "%{$this->param['search']}%"]; | ||
| 28 | -// } | ||
| 29 | -// $sort = ['id' => 'desc']; | ||
| 30 | -// $data = $logic->getList($map, $sort, ['id', 'pid', 'title'],0); | ||
| 31 | -// return $this->success(Arr::listToTree($data)); | 23 | + $map = []; |
| 24 | + if(!empty($this->param['search'])){ | ||
| 25 | + $map[] = ['title', 'like', "%{$this->param['search']}%"]; | ||
| 26 | + } | ||
| 27 | + $sort = ['id' => 'desc']; | ||
| 28 | + $data = $logic->getList($map, $sort, ['id', 'pid', 'title'],0); | ||
| 29 | + return $this->success(Arr::listToTree($data)); | ||
| 32 | } | 30 | } |
| 33 | 31 | ||
| 34 | public function info(Request $request, DeptLogic $logic){ | 32 | public function info(Request $request, DeptLogic $logic){ |
-
请 注册 或 登录 后发表评论