You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

1 year ago
// 在浏览器 window 对象中新建名为 APP 的容器变量, 用于存放平台的全局变量
window.APP = {};
// 全局配置
window.APP.configure ={
// 应用上下文路径
webContextPath: '[(@{/})]'.startsWith('[')? '/' : '[(@{/})]',
6 months ago
1 year ago
// 默认后端 API 请求的服务地址前缀
apiContextPaths: {
DEFAULT: '[(@{/})]'.startsWith('[')? 'http://localhost:8080/' : '[(@{/})]',
},
6 months ago
6 months ago
// 前端运行环境
// alone: 前端独立部署, 即前端打包后独立部署于 web 服务上(如: nginx, caddy 等)
// develop: 前端运行在开发环境, 即前端在开发环境下运行(如: webpack)
// backend: 前端运行在后端环境, 即前后端一起打包后部署在应用服务器上(如: tomcat, undertow, jeety等)
fontendScenario: 'develop',
6 months ago
// router 历史模式
routerHistoryMode: 'hash',
1 year ago
// 是否启用本地 mock
enableLocalMock : false,
6 months ago
1 year ago
// mock 请求响应时间(单位:毫秒)
localMockTimeout : 10,
6 months ago
1 year ago
// 是否启用使用远程服务端配置
enableRemoteConfigure : true,
6 months ago
1 year ago
// 是否首先使用本地路由
useLocaleRouterFirst : true,
6 months ago
1 year ago
// axios 配置
axios : {
baseURL: '',
timeout: 1000 * 60,
6 months ago
crossdomain: true
1 year ago
}
}