routes.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. const routes = [
  2. {
  3. layout: false,
  4. name: 'login',
  5. locale: 'menu.login',
  6. path: '/login',
  7. component: './Sys/Login',
  8. },
  9. {
  10. name: 'welcome',
  11. icon: 'smile',
  12. path: '/welcome',
  13. component: './Welcome',
  14. },
  15. {
  16. name: 'admin',
  17. icon: 'SettingOutlined',
  18. path: '/admin',
  19. routes: [
  20. {
  21. name: 'products',
  22. path: '/admin/products',
  23. component: './Admin/Product',
  24. },
  25. {
  26. path: '/admin/products/:id',
  27. component: './Admin/Product/Detail',
  28. hideInMenu: true,
  29. },
  30. {
  31. name: 'depts',
  32. path: '/admin/depts',
  33. component: './Admin/Dept',
  34. },
  35. {
  36. name: 'users',
  37. path: '/admin/users',
  38. component: './Admin/User',
  39. },
  40. ],
  41. },
  42. {
  43. name: 'sys',
  44. icon: 'SettingOutlined',
  45. path: '/sys',
  46. hideInMenu: true,
  47. routes: [
  48. {
  49. name: 'userInfo',
  50. path: '/sys/userInfo',
  51. component: './Sys/UserInfo',
  52. },
  53. {
  54. name: 'modifyPassword',
  55. path: '/sys/modifyPassword',
  56. component: './Sys/ModifyPassword',
  57. },
  58. ],
  59. },
  60. {
  61. name: 'exception.403',
  62. path: '/403',
  63. layout: false,
  64. component: './403',
  65. },
  66. {
  67. name: 'exception.404',
  68. path: '/404',
  69. layout: false,
  70. component: './404',
  71. },
  72. {
  73. name: 'exception.500',
  74. path: '/500',
  75. layout: false,
  76. component: './500',
  77. },
  78. {
  79. path: '/',
  80. redirect: '/welcome',
  81. },
  82. {
  83. path: '*',
  84. layout: false,
  85. redirect: '/404',
  86. },
  87. ];
  88. export default routes;