소스 검색

pc权限调整

lizhen_gitee 7 달 전
부모
커밋
fd20c72ba6
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 2
      application/common/library/Authcompany.php
  2. 1 1
      extend/fast/Authpc.php

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

@@ -550,13 +550,14 @@ class Authcompany extends \fast\Authpc
         $userRule = $this->getRuleList();
 
         // 必须将结果集转换为数组
-        $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')
+        $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,visible')
             ->where('type', 'NEQ',3)
             ->order('weigh', 'desc')
             ->select())->toArray();
 
         foreach ($ruleList as $k => &$v) {
-            $v['visible']    = $v['visible'] == 'normal' ? true : false;
+            $v['visible']    = $v['visible'] == 1 ? true : false;
             $v['alwaysShow'] = true;
             $v['keepAlive']  = true;
 

+ 1 - 1
extend/fast/Authpc.php

@@ -187,7 +187,7 @@ class Authpc
 
         // 筛选条件
         $where = [
-//            'status' => 'normal'
+            'status' => 'normal'
         ];
         if (!in_array('*', $ids)) {
             $where['id'] = ['in', $ids];