index_20190320114450.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import Vue from 'vue';
  2. import Router from 'vue-router';
  3. Vue.use(Router);
  4. import Layout from '../pages/layout/Layout.vue';
  5. // import Team from '../pages/team/index'
  6. export const pageRoter = [{
  7. path: '/',
  8. component: Layout,
  9. redirect: '/team/index',
  10. // name: 'Team',
  11. // hidden: true,
  12. // children: [{
  13. // path: 'team',
  14. // component: {template:"<div>有机蔬菜organic</div>"}
  15. // }]
  16. },
  17. {
  18. path: '/team',
  19. component: Layout,
  20. children: [{
  21. path: 'index',
  22. name: 'Team',
  23. component: () => import('@/pages/team/index'),
  24. }]
  25. },
  26. {
  27. path: '/user',
  28. component: Layout,
  29. children: [{
  30. path: 'index',
  31. name: 'User',
  32. component: () => import('@/pages/user/login'),
  33. }]
  34. },
  35. {
  36. path: '/project',
  37. component: Layout,
  38. children: [{
  39. path: 'index',
  40. name: 'Project',
  41. component: () => import('@/pages/project/index'),
  42. }]
  43. },
  44. {
  45. path: '/product',
  46. component: Layout,
  47. children: [{
  48. path: 'index',
  49. name: 'Product',
  50. component: () => import('@/pages/product/index'),
  51. }]
  52. },
  53. {
  54. path: '/costType',
  55. component: Layout,
  56. children: [{
  57. path: 'index',
  58. name: 'CostType',
  59. component: () => import('@/pages/costType/index'),
  60. }]
  61. },
  62. {
  63. path: '/costTeam',
  64. component: Layout,
  65. children: [{
  66. path: 'index',
  67. name: 'CostTeam',
  68. component: () => import('@/pages/costTeam/index'),
  69. }]
  70. },
  71. {
  72. path: '/manage',
  73. component: Layout,
  74. children: [{
  75. path: 'index',
  76. name: 'Manage',
  77. component: () => import('@/pages/manage/index'),
  78. },
  79. {
  80. path: 'query',
  81. name: 'Manage',
  82. component: () => import('@/pages/manage/query'),
  83. }, {
  84. path: 'cost',
  85. name: 'Manage',
  86. component: () => import('@/pages/manage/cost'),
  87. }
  88. ]
  89. }
  90. ]
  91. export default new Router({
  92. // mode: 'history', //后端支持可开
  93. scrollBehavior: () => ({
  94. y: 0
  95. }),
  96. routes: pageRoter
  97. })