50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
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' },
|
|
},
|
|
{
|
|
path: '/government-affairs-app',
|
|
component: () => import('@/views/appPage/government-affairs-app.vue'),
|
|
name: 'government-affairs-app',
|
|
meta: { title: '农业产业政务平台APP', icon: '' },
|
|
},
|
|
{
|
|
path: '/operation-app',
|
|
component: () => import('@/views/appPage/operation-app.vue'),
|
|
name: 'operation-app',
|
|
meta: { title: '农业产业运营平台APP', icon: '' },
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: constantRoutes,
|
|
});
|
|
|
|
export default router;
|