import common from './common'
import recruit from './recruit'
import Layout from '@/layout'
import { setLoginType } from '@/utils/loginType'


const remainingRouter = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    name: 'login',
    meta: {
      hidden: true,
      title: '登录/注册'
    }
  },
  {
    path: '/userAgreement',
    component: Layout,
    name: 'userAgreement',
    children: [
      {
        path: '/userAgreement',
        component: () => import('@/views/login/components/userAgreement.vue'),
        meta: {
          title: '用户协议'
        }
      }
    ]
  },
  {
    path: '/privacyPolicy',
    component: Layout,
    name: 'privacyPolicy',
    children: [
      {
        path: '/privacyPolicy',
        component: () => import('@/views/login/components/privacyPolicy.vue'),
        meta: {
          title: '隐私政策'
        }
      }
    ]
  },
]
setLoginType(remainingRouter, 'personalCommon') // 暂定：登录企业端不能访问personalCommon路由
setLoginType(common, 'common') // common 没有身份，任何情况都能访问
const routeArray = [
  ...remainingRouter,
  ...recruit,
  ...common
]

export default routeArray