const routes = [ { layout: false, name: 'login', locale: 'menu.login', path: '/login', component: './Sys/Login', }, { name: 'welcome', icon: 'smile', path: '/welcome', component: './Welcome', }, { name: 'admin', icon: 'SettingOutlined', path: '/admin', routes: [ { name: 'products', path: '/admin/products', component: './Admin/Product', }, { path: '/admin/products/:id', component: './Admin/Product/Detail', hideInMenu: true, }, { name: 'depts', path: '/admin/depts', component: './Admin/Dept', }, { name: 'users', path: '/admin/users', component: './Admin/User', }, ], }, { name: 'sys', icon: 'SettingOutlined', path: '/sys', hideInMenu: true, routes: [ { name: 'userInfo', path: '/sys/userInfo', component: './Sys/UserInfo', }, { name: 'modifyPassword', path: '/sys/modifyPassword', component: './Sys/ModifyPassword', }, ], }, { name: 'exception.403', path: '/403', layout: false, component: './403', }, { name: 'exception.404', path: '/404', layout: false, component: './404', }, { name: 'exception.500', path: '/500', layout: false, component: './500', }, { path: '/', redirect: '/welcome', }, { path: '*', layout: false, redirect: '/404', }, ]; export default routes;