|
@@ -557,6 +557,10 @@ class Authcompany extends \fast\Authpc
|
|
|
->select())->toArray();
|
|
|
|
|
|
foreach ($ruleList as $k => &$v) {
|
|
|
+ $v['alwaysShow'] = true;
|
|
|
+ $v['keepAlive'] = true;
|
|
|
+ $v['visible'] = true;
|
|
|
+
|
|
|
if (!in_array($v['namerule'], $userRule)) {
|
|
|
unset($ruleList[$k]);
|
|
|
continue;
|
|
@@ -576,12 +580,16 @@ class Authcompany extends \fast\Authpc
|
|
|
|
|
|
// 必须将结果集转换为数组
|
|
|
$ruleList = collection(\app\admin\model\PcAuthRule::where('status', 'normal')
|
|
|
- ->field('id,pid as parentId,name as namerule,title as name,path,component,component_name,icon')
|
|
|
+ ->field('id,pid as parentId,name as namerule,title as name,path,component,component_name as componentName,icon')
|
|
|
->where('type',2)->where('pid',0)
|
|
|
->order('weigh', 'desc')
|
|
|
->select())->toArray();
|
|
|
|
|
|
foreach ($ruleList as $k => &$v) {
|
|
|
+ $v['alwaysShow'] = true;
|
|
|
+ $v['keepAlive'] = true;
|
|
|
+ $v['visible'] = true;
|
|
|
+
|
|
|
if (!in_array($v['namerule'], $userRule)) {
|
|
|
unset($ruleList[$k]);
|
|
|
continue;
|