update
This commit is contained in:
+3
-1
@@ -1,7 +1,9 @@
|
||||
export function getAppEnvConfig() {
|
||||
const ENV = import.meta.env;
|
||||
const { VITE_GLOB_API_URL } = ENV;
|
||||
const { VITE_GLOB_API_URL, VITE_GLOB_API_YIN_JI, VITE_GLOB_API_JIAN_CE } = ENV;
|
||||
return {
|
||||
VITE_GLOB_API_URL,
|
||||
VITE_GLOB_API_YIN_JI,
|
||||
VITE_GLOB_API_JIAN_CE,
|
||||
};
|
||||
}
|
||||
+6
-3
@@ -1,10 +1,13 @@
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { getAppEnvConfig } from '/@/utils/env.ts';
|
||||
|
||||
const { VITE_GLOB_API_YIN_JI, VITE_GLOB_API_JIAN_CE } = getAppEnvConfig();
|
||||
//健康监测工具报警
|
||||
export const basicPath = 'ws://192.168.1.16:7098/websocket/watchMonitor';
|
||||
export const basicPath = VITE_GLOB_API_YIN_JI;
|
||||
//应急求助
|
||||
export const emergencyPath = 'ws://192.168.1.16:7011/websocket/emergency';
|
||||
export const emergencyPath = VITE_GLOB_API_JIAN_CE;
|
||||
const token =
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWRlbnRpZmllciI6ImU5Y2EyM2Q2OGQ4ODRkNGViYjE5ZDA3ODg5NzI3ZGFlIiwiZXhwIjoxNzAyNjA0MDI3fQ.MYf9yUnXO0RTFL4u96pN1Z2mBwtXU5W-QlxDgoAsoOw';
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWRlbnRpZmllciI6ImU5Y2EyM2Q2OGQ4ODRkNGViYjE5ZDA3ODg5NzI3ZGFlIiwiZXhwIjoxNzAzMjExNzQ1fQ.dadvKgAgzfK6DUd8xtrgadxPbPXUsayNNSrt3mNxKC8';
|
||||
|
||||
export function useSocket(path = basicPath) {
|
||||
const socket = ref();
|
||||
|
||||
Reference in New Issue
Block a user