forked from gxwebsoft/mp-10550
- 将租户ID从10550更新为10584 - 将应用名称从"时里院子市集"更新为"桂乐淘" - 更新package.json中的项目名称 - 更新project.config.json中的项目描述和APPID - 更新Vercel项目配置名称 - 更新头条小程序项目描述 - 更新服务器模板ID配置 - 更新各页面分享标题中的应用名称 - 更新订单确认页面的评论字段值
44 lines
941 B
TypeScript
44 lines
941 B
TypeScript
// 环境变量配置
|
|
export const ENV_CONFIG = {
|
|
// 开发环境
|
|
development: {
|
|
API_BASE_URL: 'http://127.0.0.1:9200/api',
|
|
// API_BASE_URL: 'https://cms-api.websoft.top/api',
|
|
APP_NAME: '开发环境',
|
|
DEBUG: 'true',
|
|
},
|
|
// 生产环境
|
|
production: {
|
|
API_BASE_URL: 'https://cms-api.websoft.top/api',
|
|
APP_NAME: '桂乐淘',
|
|
DEBUG: 'false',
|
|
},
|
|
// 测试环境
|
|
test: {
|
|
API_BASE_URL: 'https://cms-api.s209.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()
|