Browse Source

pc权限调整

lizhen_gitee 6 months ago
parent
commit
3a781f18d8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/common/library/Authcompany.php

+ 2 - 2
application/common/library/Authcompany.php

@@ -550,13 +550,13 @@ class Authcompany extends \fast\Authpc
         $userRule = $this->getRuleList();
 
         // 必须将结果集转换为数组
-        $ruleList = collection(\app\admin\model\PcAuthRule::where('status', 'normal')
-            ->field('id,pid as parentId,name as namerule,title as name,path,component,component_name as componentName,icon,status as visible')
+        $ruleList = collection(\app\admin\model\PcAuthRule::field('id,pid as parentId,name as namerule,title as name,path,component,component_name as componentName,icon,status as visible')
             ->where('type', 'NEQ',3)
             ->order('weigh', 'desc')
             ->select())->toArray();
 
         foreach ($ruleList as $k => &$v) {
+            $v['visible']    = $v['visible'] == 'normal' ? true : false;
             $v['alwaysShow'] = true;
             $v['keepAlive']  = true;