remaining.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. import common from './common'
  2. import recruit from './recruit'
  3. import Layout from '@/layout'
  4. import { setLoginType } from '@/utils/loginType'
  5. const remainingRouter = [
  6. {
  7. path: '/login',
  8. component: () => import('@/views/login/index'),
  9. name: 'login',
  10. meta: {
  11. hidden: true,
  12. title: '登录/注册'
  13. }
  14. },
  15. {
  16. path: '/register/selected',
  17. component: () => import('@/views/register/select.vue'),
  18. name: 'registerSelect',
  19. meta: {
  20. hidden: true,
  21. title: '注册'
  22. }
  23. },
  24. {
  25. path: '/register/person',
  26. component: () => import('@/views/register/person.vue'),
  27. name: 'personRegister',
  28. meta: {
  29. hidden: true,
  30. title: '个人用户注册'
  31. }
  32. },
  33. {
  34. path: '/register/company',
  35. component: () => import('@/views/register/company.vue'),
  36. name: 'companyRegister',
  37. meta: {
  38. hidden: true,
  39. title: '企业用户注册'
  40. }
  41. },
  42. {
  43. path: '/forgotPassword',
  44. component: () => import('@/views/login/forgotPassword.vue'),
  45. name: 'forgotPassword',
  46. meta: {
  47. hidden: true,
  48. title: '找回密码'
  49. }
  50. },
  51. {
  52. path: '/forgotPasswordEnt',
  53. component: () => import('@/views/login/forgotPasswordEnt.vue'),
  54. name: 'forgotPasswordEnt',
  55. meta: {
  56. hidden: true,
  57. title: '找回密码'
  58. }
  59. },
  60. {
  61. path: '/userAgreement',
  62. component: Layout,
  63. name: 'userAgreement',
  64. children: [
  65. {
  66. path: '/userAgreement',
  67. component: () => import('@/views/login/components/userAgreement.vue'),
  68. meta: {
  69. title: '用户协议'
  70. }
  71. }
  72. ]
  73. },
  74. {
  75. path: '/privacyPolicy',
  76. component: Layout,
  77. name: 'privacyPolicy',
  78. children: [
  79. {
  80. path: '/privacyPolicy',
  81. component: () => import('@/views/login/components/privacyPolicy.vue'),
  82. meta: {
  83. title: '隐私政策'
  84. }
  85. }
  86. ]
  87. },
  88. {
  89. path: '/UserBehaviorNorms',
  90. component: Layout,
  91. name: 'UserBehaviorNorms',
  92. children: [
  93. {
  94. path: '/UserBehaviorNorms',
  95. component: () => import('@/views/login/components/UserBehaviorNorms.vue'),
  96. meta: {
  97. title: '用户行为规范'
  98. }
  99. }
  100. ]
  101. },
  102. {
  103. path: '/WorkplaceCommunityPolicy',
  104. component: Layout,
  105. name: 'WorkplaceCommunityPolicy',
  106. children: [
  107. {
  108. path: '/WorkplaceCommunityPolicy',
  109. component: () => import('@/views/login/components/WorkplaceCommunityPolicy.vue'),
  110. meta: {
  111. title: '职场社区政策'
  112. }
  113. }
  114. ]
  115. },
  116. {
  117. path: '/CopyrightPolicy',
  118. component: Layout,
  119. name: 'CopyrightPolicy',
  120. children: [
  121. {
  122. path: '/CopyrightPolicy',
  123. component: () => import('@/views/login/components/CopyrightPolicy.vue'),
  124. meta: {
  125. title: '版权政策'
  126. }
  127. }
  128. ]
  129. },
  130. ]
  131. setLoginType(remainingRouter, 'personalCommon') // 暂定:登录企业端不能访问personalCommon路由
  132. setLoginType(common, 'common') // common 没有身份,任何情况都能访问
  133. const routeArray = [
  134. ...remainingRouter,
  135. ...recruit,
  136. ...common
  137. ]
  138. export default routeArray