吉安感知网项目-前端
张含笑
2026-02-28 76bca644be6fbf353e861aa99c6906fbd67a8f3a
feat:修改为线上地址
2 files modified
11 ■■■■ changed files
applications/mobile-web-view/env/.env.development 2 ●●● patch | view | raw | blame | history
applications/mobile-web-view/src/axios.js 9 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/env/.env.development
@@ -11,7 +11,7 @@
VITE_APP_XT_URL = http://218.202.104.82:8200
#工单详情(分享链接)
VITE_APP_XT_URL_GD = http://192.168.1.204
VITE_APP_XT_URL_GD = http://219.146.74.42:8015/api/
# ws地址
VITE_APP_WS_API_URL = wss://wrj.shuixiongit.com/drone-wss/api/v1/ws
applications/mobile-web-view/src/axios.js
@@ -10,13 +10,14 @@
import router from '@/router/'
import { serialize } from '@/utils/util'
import { getToken, removeRefreshToken, removeToken } from '@/utils/auth'
import { validatenull } from '@/utils/validate'
import { isURL, validatenull } from '@/utils/validate'
import website from '@/config/website'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import crypto from '@/utils/crypto'
import { getStore } from '@/utils/store'
import { showToast } from 'vant'
import { baseUrl } from '@/config/env'
let { VITE_APP_ENV,VITE_APP_XT_URL,VITE_APP_API } = import.meta.env
// 全局未授权错误提示状态,只提示一次
@@ -45,6 +46,12 @@
        // } else {
        //     config.url = VITE_APP_XT_URL + config.url
        // }
        //地址为已经配置状态则不添加前缀
        if (!isURL(config.url) && !config.url.startsWith(baseUrl)) {
            config.url = baseUrl + config.url
        }
        config.headers['areaCode'] = store.state.user.selectedAreaCode
        //安全请求header
        config.headers['Blade-Requested-With'] = 'BladeHttpRequest'