cloudNew/config/config.ts

128 lines
2.6 KiB
TypeScript

// import { defineConfig } from "umi";
import proxy from './proxy';
//不使用defineConfig则能在其他地方获取这些配置
export default {
plugins: [
'@umijs/plugins/dist/dva'
],
// proxy,
dva: {},
title: 'UMI4 Admin',
favicons: [
'/favicon.svg'
],
routes: [
{
path: '/',
component: '@/layouts/index',
},
{
id: 2,
key: '2',
name: '关于',
path: '/about',
redirect: '',
routes: [
{
id: 21,
key: '2-1',
name: '关于你',
path: '/about/u',
redirect: '',
pid: 2,
routes: [
{
id: 211,
key: '2-1-1',
name: '关于你1',
path: '/about/u/index',
component: "@/pages/about/u/index",
redirect: '',
pid: 21
},
{
id: 212,
key: '2-1-2',
name: '关于你2',
path: '/about/u/2',
component: "@/pages/about/u/$id",
redirect: '',
pid: 21
}
]
},
{
id: 22,
key: '2-2',
path: '/about/m',
redirect: '',
name: '(页面元素权限)关于我',
component: "@/pages/about/m",
pid: 2
},
{
id: 23,
key: '2-3',
path: '/about/um',
redirect: '',
name: '关于你和我',
component: "@/pages/about/um",
pid: 2
}
]
},
{
id: 3,
key: '3',
name: '教师',
path: '/teacher',
redirect: '',
routes: [
{
id: 31,
key: '3-1',
path: '/teacher/u',
redirect: '',
name: '(403)关于你教师',
component: "@/pages/teacher/u",
pid: 3
},
{
id: 32,
key: '3-2',
path: '/teacher/m',
redirect: '',
name: '关于我教师',
component: "@/pages/teacher/m",
pid: 3
},
{
id: 33,
key: '3-3',
path: '/teacher/um',
redirect: '',
name: '关于你和我教师',
component: "@/pages/teacher/um",
pid: 3
}
]
},
{
id: 4,
key: '4',
name: '(404)学生',
path: '/student',
redirect: '',
},
{
id: 5,
key: '5',
path: '/user/login',
redirect: '',
name: '登录',
component: "@/pages/user/login",
},
]
};