import { RouteRecordRaw } from 'vue-router' export const staticRouter: RouteRecordRaw[] = [ { path: '/', redirect: '/index' }, { path: '/index', name: 'Index', component: () => import('@/views/Index.vue'), redirect: '/home', meta: { title: '起始页' }, children: [ { path: '/home', name: 'Home', component: () => import('@/views/home/Home.vue'), meta: { title: '首页' } }, { path: '/saleMange', name: 'SaleMange', component: () => import('@/views/storehouse/sales/index.vue'), redirect: '/contract', meta: { routerView: true, title: '销售管理' }, children: [ { path: '/contractDetail/:id/:type', name: 'ContractDetail', component: () => import('@/views/storehouse/sales/ContractDetail.vue'), meta: { title: '合同详情' } } ] }, { path: '/inventoryMange', name: 'InventoryMange', component: () => import('@/views/storehouse/inventory/index.vue'), redirect: '/contract', meta: { routerView: true, title: '库存管理' }, children: [ { path: '/inStorageDetail/:id', name: 'InStorageDetail', component: () => import('@/views/storehouse/inventory/InStorageDetail.vue'), meta: { title: '入库详情' } }, { path: '/receiveOutStock', name: 'ReceiveOutStock', component: () => import('@/views/storehouse/outStock/ReceiveOutStock.vue'), meta: { title: '领料出库' } }, { path: '/saleOutStock', name: 'SaleOutStock', component: () => import('@/views/storehouse/outStock/SaleOutStock.vue'), meta: { title: '销售出库' } }, { path: '/outStockDetail/:number', name: 'OutStockDetail', component: () => import('@/views/storehouse/outStock/OutStockDetail.vue'), meta: { title: '出库详情' } } ] }, { path: '/user', name: 'User', component: () => import('@/views/home/User.vue'), meta: { title: '个人中心' } } ] }, { path: '/login', name: 'login', component: () => import('@/views/Login.vue'), meta: { title: '登录' } } ] export const errorRouter = [ { path: '/404', name: '404', component: () => import('@/components/ErrorMessage/404.vue'), meta: { title: '404页面' } } ] /** * notFoundRouter(找不到路由) */ export const notFoundRouter = { path: '/:pathMatch(.*)*', name: 'notFound', redirect: { name: '404' } }