router.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. const data = [
  2. {
  3. path: '/',
  4. component: 'Layout',
  5. redirect: 'index',
  6. children: [
  7. {
  8. path: 'index',
  9. name: 'Index',
  10. component: '@/views/index/index',
  11. meta: {
  12. title: '首页',
  13. icon: 'home',
  14. affix: true,
  15. },
  16. },
  17. ],
  18. },
  19. {
  20. path: '/personnelManagement',
  21. component: 'Layout',
  22. redirect: 'noRedirect',
  23. name: 'PersonnelManagement',
  24. meta: { title: '人员', icon: 'users-cog', permissions: ['admin'] },
  25. children: [
  26. {
  27. path: 'userManagement',
  28. name: 'UserManagement',
  29. component: '@/views/personnelManagement/userManagement/index',
  30. meta: { title: '用户管理' },
  31. },
  32. {
  33. path: 'roleManagement',
  34. name: 'RoleManagement',
  35. component: '@/views/personnelManagement/roleManagement/index',
  36. meta: { title: '角色管理' },
  37. },
  38. {
  39. path: 'menuManagement',
  40. name: 'MenuManagement',
  41. component: '@/views/personnelManagement/menuManagement/index',
  42. meta: { title: '菜单管理' },
  43. },
  44. ],
  45. },
  46. ]
  47. module.exports = [
  48. {
  49. url: '/menu/navigate',
  50. type: 'post',
  51. response() {
  52. return { code: 200, msg: 'success', data: data }
  53. },
  54. },
  55. ]