From 839acd1fe3dec49c00f89522aceda084987b2dfd Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 23 Oct 2025 08:44:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/utils/common/index.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/utils/common/index.js b/src/utils/common/index.js
index 8d332d7..0cb72d1 100644
--- a/src/utils/common/index.js
+++ b/src/utils/common/index.js
@@ -10,6 +10,8 @@
*/
// 小程序更新检测
import { useUserStore } from "@/store/index.js"
+import configEnv from "@/config/env.js";
+import process from "node:process";
export function mpUpdate () {
const updateManager = uni.getUpdateManager()
@@ -39,9 +41,13 @@
})
}
+export function getEnvObj() {
+ 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 = "https://wrj.shuixiongit.com/drone-app-web-view/#/webViewWrapper"
+ const url = getEnvObj().VITE_APP_WEBVIEW_URL
// 1. 处理用户参数
const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}'
// 2. 构建查询参数字符串
--
Gitblit v1.9.3