无人机管理后台前端(已迁走)
chenyao
2025-03-17 bb15106796a4a521554785dba7861764c25a9eec
wss换地址
3 files modified
7 ■■■■ changed files
.env.development 3 ●●●●● patch | view | raw | blame | history
.env.production 2 ●●●●● patch | view | raw | blame | history
src/websocket/util/config.js 2 ●●● patch | view | raw | blame | history
.env.development
@@ -10,3 +10,6 @@
# 服务地址
VITE_APP_URL = https://wrj.shuixiongit.com/api
# 域名
VUE_APP_AREA_NAME =  https://wrj.shuixiongit.com
.env.production
@@ -14,3 +14,5 @@
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
# 域名
VUE_APP_AREA_NAME =  https://drone.shuixiongit.com
src/websocket/util/config.js
@@ -14,6 +14,6 @@
export function getWebsocketUrl() {
  const token = getToken();
  // const url = CURRENT_CONFIG.websocketURL
  const url = 'wss://wrj.shuixiongit.com/drone-wss/api/v1/ws?x-auth-token=' + encodeURI(token);
  const url = `wss://${process.env.VUE_APP_AREA_NAME}/drone-wss/api/v1/ws?x-auth-token=${encodeURI(token)}`;
  return url;
}