2024-08-05 11:36:27 +00:00
|
|
|
// router/index.js
|
|
|
|
import { createRouter, createWebHistory } from 'vue-router';
|
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: '/',
|
2024-08-08 03:25:09 +00:00
|
|
|
redirect: 'login'
|
2024-08-05 11:36:27 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/login',
|
|
|
|
name: 'login',
|
2024-08-13 07:36:40 +00:00
|
|
|
component: () => import('@/views/login/index.vue'),
|
|
|
|
beforeEnter: (to, from, next) => {
|
|
|
|
localStorage.clear()
|
|
|
|
next()
|
|
|
|
}
|
2024-08-05 11:36:27 +00:00
|
|
|
},
|
2024-08-06 09:07:36 +00:00
|
|
|
{
|
|
|
|
path: '/signup',
|
|
|
|
name: 'signup',
|
|
|
|
component: () => import('@/views/signup/index.vue')
|
|
|
|
},
|
2024-08-13 03:18:37 +00:00
|
|
|
{
|
|
|
|
path: '/result',
|
|
|
|
name: 'result',
|
|
|
|
component: () => import('@/views/result/index.vue')
|
|
|
|
},
|
2024-08-06 09:52:34 +00:00
|
|
|
{
|
|
|
|
path: '/confirm',
|
|
|
|
name: 'confirm',
|
|
|
|
component: () => import('@/views/confirm/index.vue')
|
|
|
|
},
|
2024-08-09 05:40:02 +00:00
|
|
|
{
|
|
|
|
path: '/details',
|
|
|
|
name: 'details',
|
|
|
|
component: () => import('@/views/details/index.vue')
|
|
|
|
},
|
2024-08-05 11:36:27 +00:00
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHistory(),
|
|
|
|
routes
|
|
|
|
});
|
|
|
|
router.beforeEach((to, from) => {
|
|
|
|
})
|
|
|
|
export default router;
|