This commit is contained in:
张成
2025-09-07 10:06:00 +08:00
parent 955f1003dd
commit 4c36986ade
11 changed files with 403 additions and 220 deletions

View File

@@ -17,7 +17,8 @@ const envConfigs: Record<EnvType, EnvConfig> = {
// 开发环境
development: {
name: '开发环境',
apiBaseURL: 'https://sit.light120.com',
// apiBaseURL: 'https://sit.light120.com',
apiBaseURL: 'http://localhost:9098',
timeout: 15000,
enableLog: true,
enableMock: true
@@ -26,7 +27,8 @@ const envConfigs: Record<EnvType, EnvConfig> = {
// 测试环境
test: {
name: '测试环境',
apiBaseURL: 'https://sit.light120.com',
// apiBaseURL: 'https://sit.light120.com',
apiBaseURL: 'http://localhost:9098',
timeout: 12000,
enableLog: true,
enableMock: false
@@ -53,10 +55,10 @@ export const getCurrentEnv = (): EnvType => {
// 在开发调试时,可以通过修改这里的逻辑来切换环境
// 默认在小程序中使用生产环境配置
if (currentEnv === Taro.ENV_TYPE.WEAPP) {
// 微信小程序环境
return 'production'
}
// if (currentEnv === Taro.ENV_TYPE.WEAPP) {
// // 微信小程序环境
// return 'production'
// }
// 默认返回开发环境(便于调试)
return 'development'