Files
hzdyjs/mobile/config.js
T
2025-06-26 18:30:03 +08:00

44 lines
987 B
JavaScript

/**
* 应用配置文件
*/
// 环境配置
const ENV_CONFIG = {
// 开发环境
development: {
BASE_URL: 'http://localhost:8080',
TIMEOUT: 10000,
},
// 生产环境
production: {
BASE_URL: 'https://your-api-domain.com',
TIMEOUT: 15000,
},
// 测试环境
test: {
BASE_URL: 'http://test-api.your-domain.com',
TIMEOUT: 10000,
},
};
// 当前环境(可以通过构建工具设置,这里默认为开发环境)
const CURRENT_ENV = process.env.NODE_ENV || 'development';
// 导出当前环境配置
export const config = ENV_CONFIG[CURRENT_ENV];
// 导出所有配置供其他模块使用
export default {
...config,
// 应用信息
APP_NAME: '校园管理移动端',
APP_VERSION: '1.0.0',
// API相关配置
API_PREFIX: '/api',
// 存储配置
STORAGE_PREFIX: 'xgxt_mobile_',
// 其他配置
PAGE_SIZE: 10,
MAX_FILE_SIZE: 10 * 1024 * 1024, // 10MB
};