routes.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. export default [
  2. {
  3. path: '/user',
  4. component: '../layouts/UserLayout',
  5. routes: [
  6. {
  7. name: 'login',
  8. path: '/user/login',
  9. component: './user/login',
  10. },
  11. ],
  12. },
  13. {
  14. path: '/',
  15. component: '../layouts/SecurityLayout',
  16. routes: [
  17. {
  18. path: '/',
  19. component: '../layouts/BasicLayout',
  20. authority: ['admin', 'user'],
  21. routes: [
  22. {
  23. path: '/',
  24. redirect: '/member',
  25. },
  26. {
  27. path: '/member',
  28. name: '账户管理',
  29. component: './UserManage',
  30. },
  31. {
  32. path: '/member/new',
  33. name: '账户新增',
  34. component: './UserManage/Editor',
  35. },
  36. {
  37. path: '/member/edit/:id',
  38. name: '账户编辑',
  39. component: './UserManage/Editor',
  40. },
  41. {
  42. component: './404',
  43. },
  44. ],
  45. },
  46. {
  47. component: './404',
  48. },
  49. ],
  50. },
  51. {
  52. component: './404',
  53. },
  54. ];