user.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /** When your routing table is too long, you can split it into small modules **/
  2. import Layout from '@/layout'
  3. const userRouter = {
  4. path: '/user',
  5. component: Layout,
  6. redirect: '/user/club',
  7. alwaysShow: true, // will always show the root menu
  8. name: 'userSetting', // name必须和后台配置一致,不然匹配不到
  9. meta: { title: '用户管理', icon: 'user' },
  10. children: [
  11. {
  12. path: 'record',
  13. component: () => import('@/views/index'),
  14. redirect: '/user/record/list',
  15. name: 'UserRecordMenu',
  16. meta: { title: '用户行为记录', icon: 'international' },
  17. children: [
  18. {
  19. path: 'list',
  20. hidden: true,
  21. component: () => import('@/views/user/record/list'),
  22. name: 'RecordList',
  23. meta: { title: '用户行为记录', activeMenu: '/user/record' }
  24. },
  25. {
  26. path: 'detail',
  27. hidden: true,
  28. component: () => import('@/views/user/record/detail-list.vue'),
  29. name: 'RecordDtails',
  30. meta: { title: '查看详情', noCache: true, activeMenu: '/user/record/' }
  31. }
  32. ]
  33. },
  34. {
  35. path: 'club',
  36. name: 'UserClubMenu',
  37. redirect: '/user/club/list',
  38. alwaysShow: true,
  39. component: () => import('@/views/index'),
  40. meta: { title: '机构管理' },
  41. children: [
  42. {
  43. path: 'list',
  44. name: 'ClubList',
  45. component: () => import('@/views/user/club/list'),
  46. meta: { title: '机构列表' }
  47. }
  48. ]
  49. },
  50. {
  51. path: 'supplier',
  52. name: 'UserSupplierMenu',
  53. redirect: '/user/supplier/list',
  54. alwaysShow: true,
  55. component: () => import('@/views/index'),
  56. meta: { title: '供应商管理', useDefault: true },
  57. children: [
  58. {
  59. path: 'list',
  60. name: 'SupplierAllList',
  61. component: () => import('@/views/user/supplier/list'),
  62. meta: { title: '供应商列表' }
  63. }
  64. ]
  65. }
  66. ]
  67. }
  68. export default userRouter