-
Notifications
You must be signed in to change notification settings - Fork 0
/
.umirc.ts
91 lines (89 loc) · 1.78 KB
/
.umirc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { defineConfig } from '@umijs/max';
export default defineConfig({
antd: {},
access: {},
model: {},
initialState: {},
request: {},
layout: {
title: 'Chatbot',
locale: false, // 默认开启,如无需菜单国际化可关闭
},
proxy: {
'/api': {
target: 'http://demo.dev.alipay.net:8080/',
'pathRewrite': { '^/api' : '/api' },
},
'/ai': {
target: 'http://demo.dev.alipay.net:5050/',
'pathRewrite': { '^/ai' : '' },
changeOrigin: true,
onProxyReq: (proxyRes, req, res) => {
res.on('close', () => proxyRes.destroy());
}
}
},
routes: [
{
path: '/',
redirect: '/chat',
access: 'canUse',
},
{
name: '',
path: '/home',
component: './Home',
// 不展示顶栏
headerRender: false,
// 不展示页脚
footerRender: false,
// 不展示菜单
menuRender: false,
access: 'canUse',
},
{
name: 'AI 对话',
path: '/chat',
component: './Chat',
access: 'canUse',
},
{
name: 'AI 大脑',
path: '/studio',
redirect: '/studio/list',
access: 'canUse',
},
{
path: 'studio',
access: 'canUse',
routes: [
{
path: '',
redirect: './list',
},
{
path: 'list',
name: 'Studio',
component: './Studio/List',
},
{
path: 'create',
name: 'Studio',
component: './Studio/Create',
},
{
path: ':id',
name: 'Studio',
component: './Studio/Edit',
},
]
},
{
name: '测试chat',
path: '/chat/:id',
component: './Chat',
hideInMenu: true,
}
],
npmClient: 'npm',
});