From 9dfd051415fb50c1cb7eabd822fc00634eec3576 Mon Sep 17 00:00:00 2001 From: fanpeng <438123081@qq.com> Date: Mon, 9 Jun 2025 15:37:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=BC=E5=AE=B9=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 ++-- pages/main/mine.vue | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/App.vue b/App.vue index 504e94b..3c515c3 100644 --- a/App.vue +++ b/App.vue @@ -19,11 +19,11 @@ sn: '', // 获取环境配置 getEnvConfig() { - // #ifdef MP-WEIXIN const envVersionStorage = getStorage('envVersion') if (envVersionStorage) { return envVersionStorage } + // #ifdef MP-WEIXIN if (this.envVersion === 'develop') { return 'XHJ' } @@ -31,7 +31,7 @@ return 'XHJ' } // #endif - return 'DEV' + return 'XHJ' } }, computed: { diff --git a/pages/main/mine.vue b/pages/main/mine.vue index 5af3ffe..f7626e6 100644 --- a/pages/main/mine.vue +++ b/pages/main/mine.vue @@ -73,9 +73,13 @@ {{ env.name }} {{ env.version }}+{{ env.buildNumber }} {{ env.baseUrl.split('/').slice(0, 3).join('/') }} - 切换环境 + 切换环境 + @@ -122,7 +126,8 @@ env: null, envVersion: '', envList: [], - show: false + show: false, + nodeEnv: '' } }, computed: { @@ -134,6 +139,7 @@ this.buttonInfo = await this.getButtonInfo() this.env = await env[await getApp().globalData.getEnvConfig()] this.envVersion = getApp().globalData.envVersion + this.nodeEnv = process.env.NODE_ENV // eslint-disable-next-line guard-for-in,no-restricted-syntax for (let key in env) {