Rap 原分销系统代码Web
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

69 satır
1.5KB

  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. })