From 6f2e7deb34380be54d7ad6783277c522cdf468e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Mon, 8 Sep 2025 13:00:20 +0800 Subject: [PATCH] 1 --- src/config/env.ts | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/config/env.ts b/src/config/env.ts index 8904ea7..2830e77 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -1,7 +1,7 @@ import Taro from '@tarojs/taro' // 环境类型 -export type EnvType = 'development' | 'test' | 'production' +export type EnvType = 'development' | 'production' // 环境配置接口 export interface EnvConfig { @@ -17,22 +17,14 @@ const envConfigs: Record = { // 开发环境 development: { name: '开发环境', - // apiBaseURL: 'https://sit.light120.com', - apiBaseURL: 'http://localhost:9098', + apiBaseURL: 'https://sit.light120.com', + // apiBaseURL: 'http://localhost:9098', timeout: 15000, enableLog: true, enableMock: true }, - // 测试环境 - test: { - name: '测试环境', - apiBaseURL: 'https://sit.light120.com', - // apiBaseURL: 'http://localhost:9098', - timeout: 12000, - enableLog: true, - enableMock: false - }, + // 生产环境 production: { @@ -85,10 +77,7 @@ export const isProduction = (): boolean => { return getCurrentEnv() === 'production' } -// 是否为测试环境 -export const isTest = (): boolean => { - return getCurrentEnv() === 'test' -} + // 环境配置调试信息 export const getEnvInfo = () => {