routes.ts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // src/router/routes.ts
  2. import type { RouteRecordRaw } from 'vue-router'
  3. export const routes: RouteRecordRaw[] = [
  4. {
  5. path: '/',
  6. redirect: '/login',
  7. },
  8. {
  9. path: '/login',
  10. name: 'Login',
  11. component: () => import('@/views/login/index.vue'),
  12. meta: { title: '登录', requiresAuth: false, keepAlive: true },
  13. },
  14. {
  15. path: '/register',
  16. name: 'Register',
  17. component: () => import('@/views/register/index.vue'),
  18. meta: { title: '注册', requiresAuth: false },
  19. },
  20. {
  21. path: '/agreement',
  22. name: 'Agreement',
  23. component: () => import('@/views/agreement/index.vue'),
  24. meta: { title: '协议', requiresAuth: false },
  25. },
  26. {
  27. path: '/invoice-information',
  28. name: 'InvoiceInformation',
  29. component: () => import('@/views/invoice-information/index.vue'),
  30. meta: { title: '自然人开票', requiresAuth: true },
  31. },
  32. {
  33. path: '/invoice-information/detail',
  34. name: 'InvoiceInformationDetail',
  35. component: () => import('@/views/invoice-information/detail.vue'),
  36. meta: { title: '应缴税信息', requiresAuth: true },
  37. },
  38. {
  39. path: '/identity-upload',
  40. name: 'UploadIdentityInformation',
  41. component: () => import('@/views/identity-upload/index.vue'),
  42. meta: { title: '开票认证', requiresAuth: true },
  43. },
  44. {
  45. path: '/face-recognition',
  46. name: 'FaceRecognition',
  47. component: () => import('@/views/face-recognition/index.vue'),
  48. meta: { title: '开票认证', requiresAuth: true },
  49. },
  50. {
  51. path: '/success',
  52. name: 'Success',
  53. component: () => import('@/views/success/index.vue'),
  54. meta: { title: '开票完成', requiresAuth: false },
  55. },
  56. {
  57. path: '/login-success',
  58. name: 'LoginSuccess',
  59. component: () => import('@/views/success/loginSuccess.vue'),
  60. meta: { title: '自然人开票', requiresAuth: false },
  61. },
  62. {
  63. path: '/pedding-face-recognition',
  64. name: 'PeddingFaceRecognition',
  65. component: () => import('@/views/pedding-face-recognition/index.vue'),
  66. meta: { title: '获取认证状态', requiresAuth: true },
  67. },
  68. {
  69. path: '/wxr',
  70. name: 'WechatRedirect',
  71. component: () => import('@/views/wechat-redirect/index.vue'),
  72. meta: { title: '路由跳转中', requiresAuth: false },
  73. },
  74. {
  75. path: '/:pathMatch(.*)*',
  76. redirect: '/login',
  77. },
  78. ]