Rap 原分销系统代码Web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2cf72e6e0d5679afdd3fefa5d9f9991ddb4a2728.svn-base 1.5KB

5 maanden geleden
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import Layout from '../layout/index'
  4. Vue.use(Router)
  5. export const constantRouterMap = [
  6. { path: '/login',
  7. meta: { title: '登录', noCache: true },
  8. component: (resolve) => require(['@/views/login'], resolve),
  9. hidden: true
  10. },
  11. {
  12. path: '/404',
  13. component: (resolve) => require(['@/views/features/404'], resolve),
  14. hidden: true
  15. },
  16. {
  17. path: '/401',
  18. component: (resolve) => require(['@/views/features/401'], resolve),
  19. hidden: true
  20. },
  21. {
  22. path: '/redirect',
  23. component: Layout,
  24. hidden: true,
  25. children: [
  26. {
  27. path: '/redirect/:path*',
  28. component: (resolve) => require(['@/views/features/redirect'], resolve)
  29. }
  30. ]
  31. },
  32. {
  33. path: '/',
  34. component: Layout,
  35. redirect: '/dashboard',
  36. children: [
  37. {
  38. path: 'dashboard',
  39. component: (resolve) => require(['@/views/home'], resolve),
  40. name: 'Dashboard',
  41. meta: { title: '首页', icon: 'index', affix: true, noCache: true }
  42. }
  43. ]
  44. },
  45. {
  46. path: '/user',
  47. component: Layout,
  48. hidden: true,
  49. redirect: 'noredirect',
  50. children: [
  51. {
  52. path: 'center',
  53. component: (resolve) => require(['@/views/system/user/center'], resolve),
  54. name: '个人中心',
  55. meta: { title: '个人中心' }
  56. }
  57. ]
  58. }
  59. ]
  60. export default new Router({
  61. // mode: 'hash',
  62. mode: 'history',
  63. scrollBehavior: () => ({ y: 0 }),
  64. routes: constantRouterMap
  65. })