From 23177bb8acaaecd636732acacca6d62659046d28 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 21 Mar 2025 16:04:01 +0800
Subject: [PATCH] 提交配置

---
 .env.development             |    3 ++-
 package.json                 |    2 +-
 .env.production              |    4 +++-
 src/websocket/util/config.js |    2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/.env.development b/.env.development
index 6892bca..886b661 100644
--- a/.env.development
+++ b/.env.development
@@ -1,3 +1,4 @@
+NODE_ENV = 'development'
 
 #开发环境配置
 VITE_APP_ENV = 'development'
@@ -11,5 +12,5 @@
 # 服务地址
 VITE_APP_URL = https://wrj.shuixiongit.com/api
 # 域名
-VUE_APP_AREA_NAME =  https://wrj.shuixiongit.com
+VITE_APP_AREA_NAME =  https://wrj.shuixiongit.com
 
diff --git a/.env.production b/.env.production
index 8b4c13d..6b68b7e 100644
--- a/.env.production
+++ b/.env.production
@@ -1,3 +1,5 @@
+NODE_ENV = 'production'
+
 #生产环境配置
 VITE_APP_ENV = 'production'
 
@@ -15,4 +17,4 @@
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 # 域名
-VUE_APP_AREA_NAME =  https://aisky.org.cn
+VITE_APP_AREA_NAME =  https://aisky.org.cn
diff --git a/package.json b/package.json
index 86201d8..3ae8478 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "name": "saber",
   "version": "4.1.0",
   "scripts": {
-    "dev": "vite --host",
+    "dev": "vite --mode development",
     "prod": "vite --mode production",
     "build:test": "vite build --mode development",
     "build:prod": "vite build --mode production",
diff --git a/src/websocket/util/config.js b/src/websocket/util/config.js
index 5b3f585..b22c14d 100644
--- a/src/websocket/util/config.js
+++ b/src/websocket/util/config.js
@@ -14,6 +14,6 @@
 export function getWebsocketUrl() {
   const token = getToken();
   // const url = CURRENT_CONFIG.websocketURL
-  const url = `wss://${process.env.VUE_APP_AREA_NAME}/drone-wss/api/v1/ws?x-auth-token=${encodeURI(token)}`;
+  const url = `wss://${import.meta.env.VITE_APP_AREA_NAME}/drone-wss/api/v1/ws?x-auth-token=${encodeURI(token)}`;
   return url;
 }

--
Gitblit v1.9.3