wugg пре 9 месеци
родитељ
комит
bd6d4ab51a
2 измењених фајлова са 10 додато и 10 уклоњено
  1. 5 5
      app/admin/model/AdminMenu.php
  2. 5 5
      app/cxinv/model/AdminMenu.php

+ 5 - 5
app/admin/model/AdminMenu.php

@@ -26,16 +26,16 @@ class AdminMenu extends Base
 
     ];
     
-    public function GetMenu($menuid){
-    	$info=$this->name('view_menu')->where(["cid"=>$menuid,"is_del"=>0])->findOrEmpty();
+    public static function GetMenu($menuid){
+    	$info=self::name('view_menu')->where(["cid"=>$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_name"=>$paren->menu_name??"","parent_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");
     }

+ 5 - 5
app/cxinv/model/AdminMenu.php

@@ -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');
     }