| | |
| | | import { useMyStore } from '/@/store' |
| | | import { DeviceStatus } from '/@/types/device' |
| | | import { useConnectWebSocket } from '/@/hooks/use-connect-websocket' |
| | | import {getWebsocketUrl} from "/@/websocket/util/config"; |
| | | import { getWebsocketUrl } from '/@/websocket/util/config' |
| | | |
| | | const root = getRoot() |
| | | const gatewayState = ref<boolean>(localStorage.getItem(ELocalStorageKey.GatewayOnline) === 'true') |
| | |
| | | const bindParam: BindBody = { |
| | | device_sn: '', |
| | | user_id: '', |
| | | domain: 2, |
| | | workspace_id: wsId.value |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | const webSorketUrl = getWebsocketUrl() + '&workspace-id=' + wsId |
| | | const webSorketUrl = getWebsocketUrl() + '&workspace-id=' + wsId.value |
| | | // 监听ws 消息 |
| | | useConnectWebSocket(messageHandler,webSorketUrl) |
| | | useConnectWebSocket(messageHandler, webSorketUrl) |
| | | |
| | | let bindNum: any |
| | | |