From 0bc05b506ba40046015f29a3dfed5f03e1773f09 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 05 Feb 2026 14:56:20 +0800
Subject: [PATCH] feat:修改ax
---
applications/mobile-web-view/env/.env | 2
/dev/null | 33 ----------------
applications/mobile-web-view/env/.env.development | 3 -
applications/mobile-web-view/src/axios.js | 8 ++-
applications/mobile-web-view/env/.env.production | 3 -
applications/mobile-web-view/env/.env.test | 12 +-----
6 files changed, 10 insertions(+), 51 deletions(-)
diff --git a/applications/mobile-web-view/env/.env b/applications/mobile-web-view/env/.env
index 6e29cc1..d39994d 100644
--- a/applications/mobile-web-view/env/.env
+++ b/applications/mobile-web-view/env/.env
@@ -5,7 +5,7 @@
VITE_APP_API = /api
#线上用的
-VITE_APP_XT_URL='http://218.202.104.82:8200'
+VITE_APP_XT_URL=http://218.202.104.82:8200
#调试参数
VITE_APP_DEBUG_KEY = saber
diff --git a/applications/mobile-web-view/env/.env.development b/applications/mobile-web-view/env/.env.development
index 903d8ac..2757c5e 100644
--- a/applications/mobile-web-view/env/.env.development
+++ b/applications/mobile-web-view/env/.env.development
@@ -8,8 +8,7 @@
VITE_APP_MAP_TILE_URL = https://wrj.shuixiongit.com/3Dtile
#开发环境代理地址(推荐本地新建文件 .env.development.local 来进行覆盖)
-VITE_APP_API_URL = http://218.202.104.82:8200
-# VITE_APP_API_URL = http://192.168.1.168
+VITE_APP_XT_URL = http://218.202.104.82:8200
# ws地址
VITE_APP_WS_API_URL = wss://wrj.shuixiongit.com/drone-wss/api/v1/ws
diff --git a/applications/mobile-web-view/env/.env.localhost b/applications/mobile-web-view/env/.env.localhost
deleted file mode 100644
index f299240..0000000
--- a/applications/mobile-web-view/env/.env.localhost
+++ /dev/null
@@ -1,33 +0,0 @@
-#开发环境配置
-VITE_APP_ENV = 'local'
-
-# 是否在打包时开启压缩,支持 gzip 和 brotli
-VITE_BUILD_COMPRESS = gzip
-
-# 目前倾斜摄影地址
-VITE_APP_MAP_TILE_URL = http://192.168.1.227:80/3Dtile
-
-#开发环境代理地址(推荐本地新建文件 .env.development.local 来进行覆盖)
-# VITE_APP_API_URL = http://192.168.1.227:80/api
-VITE_APP_API_URL = http://192.168.1.227:80/api
-# ws地址
-VITE_APP_WS_API_URL = wss://192.168.1.227:80/drone-wss/api/v1/ws
-
-# 航线文件地址
-VITE_APP_AIRLINE_URL = http://192.168.1.227:80/minio/cloud-bucket
-
-VITE_APP_PICTURE_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket
-
-#内嵌航线规划iframe地址
-VITE_APP_WAY_LINE_PLAN = 'http://192.168.1.227:80/bigScreen/#/layout/iframeWayline'
-
-
-# 行政区划存放地址
-VITE_APP_REGION_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_region
-
-# 国土举证 图片和视频
-VITE_APP_MEDIAPANEL_API_URL = http://192.168.1.227:80/minio/cloud-bucket
-
-
-# arcgis服务图层地址
-VITE_APP_ARCGIS_URL = http://192.168.1.227:80/arcgis116
diff --git a/applications/mobile-web-view/env/.env.production b/applications/mobile-web-view/env/.env.production
index bc56c1b..c86b92f 100644
--- a/applications/mobile-web-view/env/.env.production
+++ b/applications/mobile-web-view/env/.env.production
@@ -11,8 +11,7 @@
#生产环境配置
VITE_APP_ENV = 'production'
-#开发环境连接生产api
-VITE_APP_API_URL = https://aisky.org.cn/api
+VITE_APP_XT_URL = http://218.202.104.82:8200
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
diff --git a/applications/mobile-web-view/env/.env.test b/applications/mobile-web-view/env/.env.test
index f285209..57dd477 100644
--- a/applications/mobile-web-view/env/.env.test
+++ b/applications/mobile-web-view/env/.env.test
@@ -1,13 +1,3 @@
-###
- # @Author : yuan
- # @Date : 2025-06-06 18:08:02
- # @LastEditors : yuan
- # @LastEditTime : 2025-06-06 18:09:52
- # @FilePath : \.env.test
- # @Description :
- # Copyright 2025 OBKoro1, All Rights Reserved.
- # 2025-06-06 18:08:02
-###
#测试环境配置
VITE_APP_ENV = 'test'
@@ -15,6 +5,8 @@
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
+VITE_APP_XT_URL = http://218.202.104.82:8200
+
# 目前倾斜摄影地址
VITE_APP_MAP_TILE_URL = https://wrj.shuixiongit.com/3Dtile
diff --git a/applications/mobile-web-view/src/axios.js b/applications/mobile-web-view/src/axios.js
index 04da83a..3f14da4 100644
--- a/applications/mobile-web-view/src/axios.js
+++ b/applications/mobile-web-view/src/axios.js
@@ -39,8 +39,6 @@
showSpinner: false,
})
-axios.baseURL = VITE_APP_ENV === 'development' ? VITE_APP_API : VITE_APP_XT_URL
-
//http request拦截
axios.interceptors.request.use(
config => {
@@ -54,7 +52,11 @@
// config.url = VITE_APP_API + config.url
// }
// config.url = VITE_APP_ENV === 'development' ? config.url : VITE_APP_XT_URL + config.url
-
+ if ( VITE_APP_ENV === 'development'){
+ config.url = VITE_APP_API + config.url
+ }else{
+ config.url = VITE_APP_XT_URL + config.url
+ }
config.headers['areaCode'] = store.state.user.selectedAreaCode
//安全请求header
config.headers['Blade-Requested-With'] = 'BladeHttpRequest'
--
Gitblit v1.9.3