From 5ed43611d8908b38a14194ad636b0988b189098c Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Tue, 21 Oct 2025 22:51:01 +0800
Subject: [PATCH] feat: 代码提示被影响修复
---
src/utils/common/index.js | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/utils/common/index.js b/src/utils/common/index.js
index 666398d..0cb72d1 100644
--- a/src/utils/common/index.js
+++ b/src/utils/common/index.js
@@ -42,13 +42,12 @@
}
export function getEnvObj() {
- const envName = JSON.parse(__APP_ENV__.UNI_CUSTOM_DEFINE)?.ENV_NAME
- return configEnv[envName] || {}
+ const envName = JSON.parse(__APP_ENV__?.UNI_CUSTOM_DEFINE||null)?.ENV_NAME
+ return configEnv[envName || import.meta.env.VITE_APP_ENV] || {}
}
export function getWebViewUrl (targetUrl, otherParams) {
const userStore = useUserStore()
const url = getEnvObj().VITE_APP_WEBVIEW_URL
- console.log(getEnvObj(),'getEnvObj()')
// 1. 处理用户参数
const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}'
// 2. 构建查询参数字符串
--
Gitblit v1.9.3