From 342f8990cdfaa642d5cb6690653e0c632b541e18 Mon Sep 17 00:00:00 2001 From: chen wei bo <1025839511@qq.com> Date: Fri, 15 Aug 2025 14:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Scripts/chat18x/config/env/appConfig.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } /** 切换环境(开发工具用) */