remaining.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. name: 'userAgreement',
  63. children: [
  64. {
  65. path: '/userAgreement',
  66. component: () => import('@/views/login/components/userAgreement.vue'),
  67. meta: {
  68. title: '用户协议'
  69. }
  70. }
  71. ]
  72. },
  73. {
  74. path: '/privacyPolicy',
  75. name: 'privacyPolicy',
  76. children: [
  77. {
  78. path: '/privacyPolicy',
  79. component: () => import('@/views/login/components/privacyPolicy.vue'),
  80. meta: {
  81. title: '隐私政策'
  82. }
  83. }
  84. ]
  85. },
  86. {
  87. path: '/UserBehaviorNorms',
  88. name: 'UserBehaviorNorms',
  89. children: [
  90. {
  91. path: '/UserBehaviorNorms',
  92. component: () => import('@/views/login/components/UserBehaviorNorms.vue'),
  93. meta: {
  94. title: '用户行为规范'
  95. }
  96. }
  97. ]
  98. },
  99. {
  100. path: '/WorkplaceCommunityPolicy',
  101. name: 'WorkplaceCommunityPolicy',
  102. children: [
  103. {
  104. path: '/WorkplaceCommunityPolicy',
  105. component: () => import('@/views/login/components/WorkplaceCommunityPolicy.vue'),
  106. meta: {
  107. title: '职场社区政策'
  108. }
  109. }
  110. ]
  111. },
  112. {
  113. path: '/CopyrightPolicy',
  114. name: 'CopyrightPolicy',
  115. children: [
  116. {
  117. path: '/CopyrightPolicy',
  118. component: () => import('@/views/login/components/CopyrightPolicy.vue'),
  119. meta: {
  120. title: '版权政策'
  121. }
  122. }
  123. ]
  124. },
  125. {
  126. path: '/404',
  127. name: '404Page',
  128. component: () => import('@/views/404/index.vue'),
  129. meta: {
  130. title: '404'
  131. }
  132. },
  133. // {
  134. // path: '/:path(.*)*',
  135. // redirect: '/404',
  136. // name: '404PageRedirect',
  137. // },
  138. // {
  139. // path: '/:catchAll(.*)',
  140. // redirect: '/404'
  141. // }
  142. ]
  143. setLoginType(remainingRouter, 'personalCommon') // 暂定:登录企业端不能访问personalCommon路由
  144. setLoginType(common, 'common') // common 没有身份,任何情况都能访问
  145. const routeArray = [
  146. ...remainingRouter,
  147. ...recruit,
  148. ...common
  149. ]
  150. export default routeArray