Files
template-10584/config/env.ts
赵忠林 5bddf6e438 fix(order): 修复订单列表筛选逻辑和支付倒计时配置
- 将开发环境API_BASE_URL切换回本地地址
- 修复Tabs状态筛选器逻辑,全部状态时删除筛选参数
- 更新待收货和退货/售后标签页的订单过滤规则
- 将支付倒计时超时时间从1小时调整为24小时
- 修复立即支付按钮显示逻辑,避免已过期订单仍显示支付按钮
2026-02-06 00:17:43 +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()