1234567891011121314151617181920212223242526272829 |
- import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory, Router } from 'vue-router';
- import { useAppStore } from '@/stores/index';
- import appSetting from '@/app-setting';
- const constantRouterMap: RouteRecordRaw[] = [
- { path: '/login', component: () => import('@/views/auth/boxed-signin.vue') },
- /* { path: '/franchise/login', component: () => import('@/views/login/index.vue'), hidden: true },
- { path: '/404', component: () => import('@/views/errorPage/404.vue'), hidden: true },
- { path: '/401', component: () => import('@/views/errorPage/401.vue'), hidden: true },
- { path: '/payType', component: () => import('@/components/payType.vue'), hidden: false }, */
- ];
- const router = createRouter({
- history: createWebHistory(),
- scrollBehavior: () => ({ y: 0 }),
- routes: constantRouterMap
- })
- const asyncRouterMap: RouteRecordRaw[] = [
- {
- path: '/',
- redirect: '/dashboard',
- name: 'dashboard',
- children: [
- { path: 'dashboard', component: () => import('@/views/index.vue'), name: 'dashboard', meta: { title: 'home', icon: 'dashboard' } }
- ]
- },
- ]
- export { constantRouterMap, asyncRouterMap };
- export default router;
|