Explorar el Código

权限管理接口优化

evoxwht hace 2 años
padre
commit
a6c1d7c777
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      crmeb/app/services/system/SystemRouteServices.php

+ 5 - 2
crmeb/app/services/system/SystemRouteServices.php

@@ -97,8 +97,11 @@ class SystemRouteServices extends BaseServices
         foreach ($list as $key => $item) {
             if (!empty($item['children'])) {
                 foreach ($item['children'] as $k => $v) {
-                    if (isset($v['cate_id']) && isset($v['method']) && $v['method'] === 'DELETE') {
-                        $v['method'] = 'DEL';
+                    if (isset($v['cate_id']) && isset($v['method'])) {
+                        if ($v['method'] === 'DELETE') {
+                            $v['method'] = 'DEL';
+                        }
+                        $v['pid'] = $v['cate_id'];
                         $list[$key]['children'][$k] = $v;
                     }
                 }