Files
glt-taro/config/env.ts
赵忠林 1ce6381248 feat(api): 添加电子围栏功能并重构仓库模块
- 新增 shopStoreFence 模块,包含完整的CRUD接口和数据模型
- 将 shopWarehouse 重命名为 shopStoreWarehouse 并更新相关接口
- 配置文件中切换API_BASE_URL到生产环境地址
- 地址管理页面标题从"地址管理"改为"配送管理"
- 配送员页面收益描述从"工资收入"改为"本月配送佣金"
- 用户地址列表增加每月修改次数限制逻辑
- 更新地址数据模型增加updateTime字段
- 页面组件中的收货地址文案统一改为配送地址
- 移除用户优惠券页面中不必要的导航链接
2026-02-07 18:52:35 +08:00

45 lines
983 B
TypeScript

// 环境变量配置
export const ENV_CONFIG = {
// 开发环境
development: {
// API_BASE_URL: 'http://127.0.0.1:9200/api',
API_BASE_URL: 'https://mp-api.websoft.top/api',
APP_NAME: '开发环境',
DEBUG: 'true',
},
// 生产环境
production: {
API_BASE_URL: 'https://mp-api.websoft.top/api',
APP_NAME: '桂乐淘',
DEBUG: 'false',
},
// 测试环境
test: {
// API_BASE_URL: 'http://127.0.0.1:9200/api',
API_BASE_URL: 'https://mp-api.websoft.top/api',
APP_NAME: '测试环境',
DEBUG: 'true',
}
}
// 获取当前环境配置
export function getEnvConfig() {
const env = process.env.NODE_ENV || 'development'
if (env === 'production') {
return ENV_CONFIG.production
} else { // @ts-ignore
if (env === 'test') {
return ENV_CONFIG.test
} else {
return ENV_CONFIG.development
}
}
}
// 导出环境变量
export const {
API_BASE_URL,
APP_NAME,
DEBUG
} = getEnvConfig()