38 lines
789 B
JavaScript
38 lines
789 B
JavaScript
import { createRouter, createWebHistory } from 'vue-router';
|
|
import Layout from '@/layouts/index.vue';
|
|
|
|
export const constantRoutes = [
|
|
{
|
|
path: '/login',
|
|
name: 'login',
|
|
component: () => import('@/views/login/index.vue'),
|
|
hidden: true,
|
|
meta: {
|
|
title: '登录',
|
|
icon: 'Login',
|
|
},
|
|
},
|
|
{
|
|
path: '/',
|
|
name: 'layout',
|
|
component: Layout,
|
|
redirect: '/platform',
|
|
meta: { title: '平台入口', icon: 'House' },
|
|
children: [
|
|
{
|
|
path: '/platform',
|
|
component: () => import('@/views/index.vue'),
|
|
name: 'platform',
|
|
meta: { title: '平台入口', icon: 'House' },
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: constantRoutes,
|
|
});
|
|
|
|
export default router;
|