吉安感知网项目-前端
张含笑
2026-02-05 0bc05b506ba40046015f29a3dfed5f03e1773f09
feat:修改ax
5 files modified
1 files deleted
61 ■■■■ changed files
applications/mobile-web-view/env/.env 2 ●●● patch | view | raw | blame | history
applications/mobile-web-view/env/.env.development 3 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/env/.env.localhost 33 ●●●●● patch | view | raw | blame | history
applications/mobile-web-view/env/.env.production 3 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/env/.env.test 12 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/src/axios.js 8 ●●●●● patch | view | raw | blame | history
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
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
applications/mobile-web-view/env/.env.localhost
File was deleted
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
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
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'