-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrdc.config.js
104 lines (103 loc) · 3 KB
/
rdc.config.js
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = {
useLocal: true,
framework: 'vue',
mappings: [{
from: 'app',
to: 'src',
}],
npm: {
name: 'rdc-nut',
version: '0.0.1-beta.55',
},
lint: {
ext: ['.js', '.vue', '.ts']
},
docs: {
url: 'https://kaola-fed.github.io/rdc-nut/',
userStyles: '//kaola-haitao.oss.kaolacdn.com/cf345824-9e1a-47ec-86fe-3455af8bfb96.css',
},
render: {
includes: [
'.html',
'.js',
'.ts',
// .sentrycli.rc
'.rc'
],
tags: ['///', '///'],
mock: {
port: 8080,
layout: 'kaola-basic',
head: {
title: '供应链管理系统',
styles: [
'//at.alicdn.com/t/font_393438_2tbubgazdlxo5hfr.css'
],
},
api: {
// getUserInfo: '/sc-workdesk/api/userInfo',
// getMenus: '/sc-workdesk/api/menu/left'
},
hubble: {
testKey: 'MA-8FAE-2AEEAA1727B7',
onlineKey: 'MA-B4A8-445698C8D4FE',
},
feedback: {
disable: false
},
build: {
publicPath: '/public/'
},
sentry: {
org: 'kaolafed',
project: 'kaola-rhea-fed',
dsn: 'https://[email protected]/40',
token: '29ccec3e738b46d19fa1157f889c6ab9a0927556c1934bfa9d8460dae14a5ae4',
},
rdsVue: {
disable: false
}
}
},
variables: {
nut: {
babel: {
transpileModules: [],
},
chainWebpack: (config) => {
},
plugins: {
'kaola-custom': {
// path: require.resolve('./nut/plugins/layout/kaola-advanced'),
},
}
},
proxy: {
host: 'ms.kaola.com',
rules: [
{
prefix: ['/api', '/sc-workdesk'],
}
]
},
request: {
handleRequestError: (res) => {
if(res && res.code === 10000 || res.code === 10007 || res.retcode === 10007) {
location.href = `/api/login?redirect=${encodeURIComponent(window.location.href)}`;
} else if (res && res.code === 403) {
location.href = 'pages/unauthorized/index@common-pages';
} else {
// eslint-disable-next-line @typescript-eslint/no-var-requires
// const { KLModal } = require('nek-ui');
// KLModal.alert((res && res.message) || '返回异常');
}
}
},
rdsVue: {
authUrl: '/api/common/auth',
selectUrl: () => {
return '/api/selectList';
}
}
},
};