You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import {createRouter, createWebHashHistory} from 'vue-router'
|
|
|
|
import Layout from '@/layout/index.vue'
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
name: "Home",
|
|
|
|
component: Layout,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "login",
|
|
|
|
name: "Login",
|
|
|
|
component: () => import("@/views/login/index.vue")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "404",
|
|
|
|
name: "NotFound",
|
|
|
|
component: () => import("@/views/404.vue")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "personal",
|
|
|
|
name: "Personal",
|
|
|
|
meta: {
|
|
|
|
requireAuth: true,
|
|
|
|
},
|
|
|
|
component: () => import("@/views/personal/index.vue"),
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "message",
|
|
|
|
name: "PersonalMessage",
|
|
|
|
meta: {
|
|
|
|
requireAuth: true,
|
|
|
|
},
|
|
|
|
component: () => import("@/views/personal/PersonalMessage.vue")
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "app",
|
|
|
|
name: "App",
|
|
|
|
meta: {
|
|
|
|
requireAuth: true,
|
|
|
|
},
|
|
|
|
component: () => import("@/views/app/index.vue")
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/:pathMatch(.*)*",
|
|
|
|
name: "404",
|
|
|
|
redirect: "/404"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
const router = createRouter({history: createWebHashHistory(), routes})
|
|
|
|
|
|
|
|
export default router
|