Browse Source

[智价云] 权限返回格式更新

(cherry picked from commit 2fb2e2b12dae32f1e4ae312460b8d15dc859920e)
tangyuanwang 1 week ago
parent
commit
e283ff2f7d
2 changed files with 6 additions and 0 deletions
  1. 3 0
      app/Models/Manager/AuthRule.php
  2. 3 0
      app/Models/Manager/Personnel/RolesAuthRule.php

+ 3 - 0
app/Models/Manager/AuthRule.php

@@ -124,6 +124,9 @@ class AuthRule extends Model
         }
         // 去重
         $rules                      = array_unique($rules);
+        if(!empty($rules)){
+            rsort($rules);
+        }
         //  返回结果
         return                      $rules;
     }

+ 3 - 0
app/Models/Manager/Personnel/RolesAuthRule.php

@@ -200,6 +200,9 @@ class RolesAuthRule extends Model
         }
         // 去重
         $rules                      = array_unique($rules);
+        if(!empty($rules)){
+            rsort($rules);
+        }
         //  返回结果
         return                      $rules;
     }