|
@@ -23,16 +23,16 @@ class AdminMenu extends Base
|
|
|
'menu_type' =>'tinyint',//1菜单2 页面
|
|
|
];
|
|
|
|
|
|
- public function GetMenu($menuid){
|
|
|
- $info=$this->where(['id'=>$menuid,'is_del'=>0])->findOrEmpty();
|
|
|
+ public static function GetMenu($menuid){
|
|
|
+ $info=self::where(['id'=>$menuid,'is_del'=>0])->findOrEmpty();
|
|
|
if($info->pid>0){
|
|
|
- $paren = $this->where(['id'=>$menuid,'is_del'=>0])->findOrEmpty();
|
|
|
+ $paren = self::where(['id'=>$menuid,'is_del'=>0])->findOrEmpty();
|
|
|
}
|
|
|
return ['menu_name'=>$info->menu_name,'parent'=>$paren->menu_name??'','paren_id'=>$info->pid];
|
|
|
}
|
|
|
|
|
|
- public function GetAction($action){
|
|
|
- return $this->name('view_menu')
|
|
|
+ public static function GetAction($action){
|
|
|
+ return self::name('view_menu')
|
|
|
->where(['aid'=>$action])
|
|
|
->column('id parent_id,menu_name parent_name,cname menu_name,cname menu_id,action_name,aid action_id');
|
|
|
}
|