diff --git a/assets/Scripts/chat18x/config/env/appConfig.ts b/assets/Scripts/chat18x/config/env/appConfig.ts index 11a99095..d6162670 100644 --- a/assets/Scripts/chat18x/config/env/appConfig.ts +++ b/assets/Scripts/chat18x/config/env/appConfig.ts @@ -31,8 +31,10 @@ export class AppConfig { // this.applyLocalOverride(); } - /** 外部读取用 */ - get env() { return this._cfg.env; } + public getEnv(): Env { return this._cfg.env; } + public isDev(): boolean { return this._cfg.env === Env.Dev; } + public isTest(): boolean { return this._cfg.env === Env.Test; } + public isProd(): boolean { return this._cfg.env === Env.Prod; } get endpoints() { return this._cfg.endpoints; } /** 切换环境(开发工具用) */