Files
urbanLifeline/urbanLifelineWeb/packages/workcase/public/app-config.js
2025-12-06 14:49:46 +08:00

60 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @description 应用运行时配置文件
* @author yslg
* @since 2025-12-06
*
* 说明:
* 1. 此文件在生产环境中被加载,用于覆盖内置配置
* 2. Docker 部署时,可通过挂载此文件来修改配置,无需重新构建
* 3. 配置结构必须与 packages/shared/src/config/index.ts 中的 AppRuntimeConfig 保持一致
*
* 使用示例Docker
* docker run -v /path/to/app-config.js:/app/public/app-config.js my-app:latest
*/
window.APP_RUNTIME_CONFIG = {
// 环境标识
env: 'production',
// API 配置
api: {
baseUrl: '/api',
timeout: 30000
},
// 应用基础路径
baseUrl: '/',
// 文件配置
file: {
downloadUrl: '/api/file/download/',
uploadUrl: '/api/file/upload',
maxSize: {
image: 5, // MB
video: 100, // MB
document: 10 // MB
},
acceptTypes: {
image: 'image/*',
video: 'video/*',
document: '.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx'
}
},
// Token 配置
token: {
key: 'token',
refreshThreshold: 300000 // 5分钟
},
// 公共资源路径
publicImgPath: '/img',
publicWebPath: '/',
// 功能开关
features: {
enableDebug: false,
enableMockData: false
}
};