作者 lyh

gx

@@ -29,19 +29,7 @@ class ProjectMenuController extends BaseController @@ -29,19 +29,7 @@ class ProjectMenuController extends BaseController
29 * @time :2023/6/21 17:24 29 * @time :2023/6/21 17:24
30 */ 30 */
31 public function lists(ProjectMenuLogic $projectMenuLogic){ 31 public function lists(ProjectMenuLogic $projectMenuLogic){
32 - $lists = $projectMenuLogic->MenuList();  
33 - $this->response('success',Code::SUCCESS,$lists);  
34 - }  
35 -  
36 - /**  
37 - * @remark :添加菜单时获取菜单列表  
38 - * @name :list  
39 - * @author :lyh  
40 - * @method :post  
41 - * @time :2023/6/21 17:24  
42 - */  
43 - public function list(ProjectMenuLogic $projectMenuLogic){  
44 - $lists = $projectMenuLogic->MenuList(); 32 + $lists = $projectMenuLogic->MenuList($this->map);
45 $this->response('success',Code::SUCCESS,$lists); 33 $this->response('success',Code::SUCCESS,$lists);
46 } 34 }
47 35
@@ -91,8 +91,8 @@ class ProjectMenuLogic extends BaseLogic @@ -91,8 +91,8 @@ class ProjectMenuLogic extends BaseLogic
91 * @method :post 91 * @method :post
92 * @time :2023/6/21 17:26 92 * @time :2023/6/21 17:26
93 */ 93 */
94 - public function MenuList(){  
95 - $lists = $this->model->list(['status'=>$this->model::ZERO],'created_at'); 94 + public function MenuList($map){
  95 + $lists = $this->model->list($map,'created_at');
96 $menu = array(); 96 $menu = array();
97 foreach ($lists as $k => $v){ 97 foreach ($lists as $k => $v){
98 $v = (array)$v; 98 $v = (array)$v;