route.php 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. $router->group(function () use ($router){
  3. // 角色
  4. $router->resource('roles', '\catchAdmin\permissions\controller\Role');
  5. $router->get('getPartRoles', '\catchAdmin\permissions\controller\Role@getPartRoles');
  6. //判断是否是全部数据权限
  7. $router->get('role/isAllDataRange', '\catchAdmin\permissions\controller\Role@isAllDataRange');
  8. // 角色列表
  9. $router->get('/role/get/permissions', '\catchAdmin\permissions\controller\Role@getPermissions');
  10. // 权限
  11. $router->resource('permissions', '\catchAdmin\permissions\controller\Permission');
  12. $router->put('permissions/show/<id>', '\catchAdmin\permissions\controller\Permission@show');
  13. $router->get('controller/methods/<id>', '\catchAdmin\permissions\controller\Permission@getMethods');
  14. // 部门
  15. $router->resource('departments', '\catchAdmin\permissions\controller\Department');
  16. $router->get('getDepartmentType', '\catchAdmin\permissions\controller\Department@getDepartmentType');
  17. //只到学校部门数据
  18. $router->get('school_departs', '\catchAdmin\permissions\controller\Department@getSchoolDeparts');
  19. //年级、班级数据
  20. $router->get('class_departs', '\catchAdmin\permissions\controller\Department@getClassDeparts');
  21. $router->get('yys_departs', '\catchAdmin\permissions\controller\Department@getYysDeparts');
  22. //只显示有学校的运营商及以下数据
  23. $router->get('departments_has_school', '\catchAdmin\permissions\controller\Department@getDepartsHasSchool');
  24. $router->get('getDepartmentAreaId', '\catchAdmin\permissions\controller\Department@getDepartmentAreaId');
  25. // 所有职位
  26. $router->get('jobs/all', '\catchAdmin\permissions\controller\Job@getAll');
  27. // 岗位
  28. $router->resource('jobs', '\catchAdmin\permissions\controller\Job');
  29. // 用户
  30. $router->resource('users', '\catchAdmin\permissions\controller\User');
  31. //微信客户端修改用户信息
  32. $router->post('users/wxuser', '\catchAdmin\permissions\controller\User@wxUsers');
  33. // 切换状态
  34. $router->put('users/switch/status/<id>', '\catchAdmin\permissions\controller\User@switchStatus');
  35. $router->put('users/recover/<id>', '\catchAdmin\permissions\controller\User@recover');
  36. $router->put('user/profile', '\catchAdmin\permissions\controller\User@profile');
  37. $router->get('users/get/roles', '\catchAdmin\permissions\controller\User@getRoles');
  38. $router->get('user/info', '\catchAdmin\permissions\controller\User@info');
  39. $router->get('user/export', '\catchAdmin\permissions\controller\User@export');
  40. $router->get('user/getAreaId', '\catchAdmin\permissions\controller\User@getAreaIdBy');
  41. $router->get('users/getUsers/<depart_id>', '\catchAdmin\permissions\controller\User@getUserByDepart');
  42. $router->get('user/getPushUserList', '\catchAdmin\permissions\controller\User@getPushUserList'); // 获取推送用户
  43. // area路由
  44. $router->get('area/getAreaTreeData', '\catchAdmin\permissions\controller\Area@getAreaTreeData');
  45. $router->get('area/getAreaTreeDataByCity/:cityid', '\catchAdmin\permissions\controller\Area@getAreaTreeDataByCity');
  46. $router->resource('area', '\catchAdmin\permissions\controller\Area');
  47. $router->post('area/getDistrictChildrenArea', '\catchAdmin\permissions\controller\Area@getDistrictChildrenArea');
  48. // sysConfig路由
  49. $router->resource('sysConfig', '\catchAdmin\permissions\controller\SysConfig');
  50. // test路由
  51. })->middleware('auth');
  52. // sysConfig路由
  53. $router->group('configs', function () use ($router){
  54. // 获取根据类型分组的配置
  55. $router->get('getListGroupByType', '\catchAdmin\permissions\controller\SysConfig@getListGroupByType');
  56. // 保存所有配置
  57. $router->post('saveAll', '\catchAdmin\permissions\controller\SysConfig@saveAll');
  58. })->middleware('auth');
  59. // department 路由
  60. $router->group('department', function () use ($router){
  61. // 获取根据类型分组的配置
  62. $router->get('getOnlySchoolData', '\catchAdmin\permissions\controller\Department@onlySchoolData');
  63. $router->get('getOnlySchoolOption', '\catchAdmin\permissions\controller\Department@getOnlySchoolOption');
  64. $router->get('getChildrenOption', '\catchAdmin\permissions\controller\Department@getChildrenOption');
  65. })->middleware('auth');
  66. //获取配置值
  67. $router->post('configs/getConfigValueBy','\catchAdmin\permissions\controller\SysConfig@getConfigValueBy');