bugfix-修改订阅处理context问题
This commit is contained in:
parent
50d3196eea
commit
7aff26f0d3
@ -127,10 +127,9 @@ export class SubscriptionClient {
|
||||
|
||||
trySubscribe(): void {
|
||||
if (this.mc.connected) {
|
||||
this.unsubscriptor = this.mc.subscribe(
|
||||
this.destination,
|
||||
this.handleMessage
|
||||
);
|
||||
this.unsubscriptor = this.mc.subscribe(this.destination, () => {
|
||||
this.handleMessage;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import EventEmitter from 'eventemitter3';
|
||||
import { GraphicApp } from '../app';
|
||||
import { GraphicState } from '../core';
|
||||
|
@ -170,14 +170,15 @@ onMounted(() => {
|
||||
onResize();
|
||||
drawApp.enableWsMassaging({
|
||||
engine: ClientEngine.Centrifugo,
|
||||
protocol: 'json',
|
||||
// protocol: 'json',
|
||||
wsUrl: getWebsocketUrl(),
|
||||
token:
|
||||
// 'Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJzZWxmIiwic3ViIjoiNiIsImV4cCI6MTY5MDc5MDczMSwiaWF0IjoxNjkwNTMxNTMxfQ.caXc0jfI766p57Qx6hnuMp6XPpnBvfQuBeFI5-mlOHLBEK6Js13jy0cfGX_FxICWUGEEV0lYI8U1EfCDYPyQ38i4BcHe88mq4jK6byztuyWtkWjx4nOMcCwO-haOfJ2E0pIJOOm5aFBWT2YRdlb63gjvDbyLwdsvO1wr4-QSkB2uyyKpTaFnYP4OiF264UdN-XYuME5k_RkjcinvcYjPR7WI2YCu_Sg0exzqQW03pspTyx5ozbuc_3JSkOA7g4aqnizMJgVAsCbTwYBnfvLClDbcztkyaqbhN5pA4Eme_yPos4ISfufjR7TyUROVp7yEV6gSLHRtPulageQxNhltXA',
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTA2MTM0MzUsImlkIjo2LCJvcmlnX2lhdCI6MTY5MDUyNzAzNSwic3ViIjoiNiJ9.sRCFji8-90hXK_l_O2ScQHYSpmnw8TILmrZGCyR9RCo',
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTA5NjU5MDYsImlkIjo2LCJvcmlnX2lhdCI6MTY5MDk2MjMwNiwic3ViIjoiNiJ9.AeSBdG20_3qP0QeeOcMbcKUqjHkr5BIZvPCs4YvGmFA',
|
||||
});
|
||||
const simulationId = 57;
|
||||
drawApp.subscribe({
|
||||
destination: '/queue/lineNet',
|
||||
destination: `simulation-${simulationId}-devices-status`,
|
||||
messageHandle: (msg) => {
|
||||
// const storage = graphicData.RtssGraphicStorage.deserialize(msg);
|
||||
console.log('设备消息处理', msg);
|
||||
|
Loading…
Reference in New Issue
Block a user