开发: 登录等功能

This commit is contained in:
zhengw
2023-04-07 17:38:15 +08:00
parent f639dc8284
commit 5834254a8f
27 changed files with 1475 additions and 153 deletions

View File

@@ -1,4 +1,4 @@
/**
/**
* @name umi 的路由配置
* @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
* @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
@@ -22,49 +22,75 @@ export default [
},
],
},
// {
// path: '/welcome',
// name: 'welcome',
// icon: 'smile',
// component: './Welcome',
// },
{
path: '/welcome',
name: 'welcome',
icon: 'smile',
component: './Welcome',
},
{
path: '/admin',
name: 'admin',
path: '/departments',
name: 'scrm',
icon: 'crown',
access: 'canAdmin',
// access: 'canAdmin',
routes: [
{
path: '/admin',
redirect: '/admin/sub-page',
path: '/departments',
redirect: '/departments/page/list',
},
{
path: '/admin/sub-page',
name: 'sub-page',
component: './Admin',
path: '/departments/page',
name: '部门管理',
// hideInBreadcrumb: true,
// component: './Admin',
routes: [
{
path: '/departments/page',
redirect: '/departments/page/list',
},
{
name: '部门员工',
icon: 'table',
path: '/departments/page/list',
component: './DepartmentsList',
},
{
name: '聊天记录',
icon: 'table',
path: '/departments/page/list2',
component: './ChatLogs',
},
],
},
{
path: '/admin/sub-page2',
name: 'sub-page2',
component: './Admin',
}
// {
// path: '/departments/sub-page2',
// name: '商品',
// // component: './TableList',
// routes: [
// {
// name: '列表',
// icon: 'table',
// path: '/departments/sub-page2/list',
// component: './TableList',
// },
// ],
// },
],
},
{
name: 'list.table-list',
icon: 'table',
path: '/list',
component: './TableList',
},
// {
// name: 'list.table-list',
// icon: 'table',
// path: '/list',
// component: './TableList',
// },
{
path: '/',
redirect: '/welcome',
redirect: '/departments',
},
{
path: '*',
layout: false,
component: './404',
},
];