Files
autoAiWorkSys/admin/config/index.js
张成 ad1465f2a1 1
2025-11-26 15:28:45 +08:00

64 lines
1.4 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.
/**
* Admin 前端配置文件
* 支持多环境配置:开发环境、测试环境、生产环境
*/
// 获取当前环境
const env = process.env.NODE_ENV || 'development'
// 基础配置
const baseConfig = {
title: '找工作管理系统',
// 是否显示设置按钮
showSettings: true,
// 是否显示标签栏
showTagsView: true,
// 是否固定头部
fixedHeader: true,
// 是否显示logo
sidebarLogo: true,
// token在Cookie中存储的天数默认1天
cookieExpires: 1,
// 系统主题色
themeColor: '#2d8cf0',
}
// 开发环境配置
const developmentConfig = {
...baseConfig,
// apiUrl: 'http://localhost:9097/admin_api/',
// uploadUrl: 'http://localhost:9097/admin_api/upload',
apiUrl: 'http://work.light120.com/admin_api/',
uploadUrl: 'http://work.light120.com/admin_api/upload',
// 开发环境显示更多调试信息
debug: true
}
// 生产环境配置
const productionConfig = {
...baseConfig,
apiUrl: 'http://work.light120.com/admin_api/',
uploadUrl: 'http://work.light120.com/admin_api/upload',
debug: false
}
// 根据环境导出对应配置
const configMap = {
development: developmentConfig,
production: productionConfig
}
const config = configMap[env] || developmentConfig
// 导出配置
export default config
// 也支持按需导出
export {
baseConfig,
developmentConfig,
productionConfig
}