From 626c712ce67dd377f5f6f1db33a8e418a406a799 Mon Sep 17 00:00:00 2001 From: hans Date: Tue, 23 Jul 2024 10:58:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-126948=20=E5=90=88=E5=B9=B6WebSocket?= =?UTF-8?q?=E7=9A=84namespace=E5=92=8Cevent=20FBP=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crud/decision.api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/crud/decision.api.ts b/src/modules/crud/decision.api.ts index 6207d6f..efb8c31 100644 --- a/src/modules/crud/decision.api.ts +++ b/src/modules/crud/decision.api.ts @@ -50,7 +50,7 @@ export class DecisionApi implements Api { /** * 获取驱动加载路径 - * @returns + * @returns */ getDriverLoadPath(data: Connection): Promise> { const form = { @@ -191,6 +191,6 @@ export class DecisionApi implements Api { Dec.socket.removeListener(name); } - Dec.socket.originOn(name, callback); + Dec.socket.on(name, callback); } } From 564c5ac01c1650bf59f7fee5a6c9c372f42c3c9d Mon Sep 17 00:00:00 2001 From: hans Date: Tue, 23 Jul 2024 12:02:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-126948=20=E5=90=88=E5=B9=B6WebSocket?= =?UTF-8?q?=E7=9A=84namespace=E5=92=8Cevent=20FBP=E9=83=A8=E5=88=86=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crud/decision.api.ts | 5 ++--- types/globals.d.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/crud/decision.api.ts b/src/modules/crud/decision.api.ts index efb8c31..b0ccd47 100644 --- a/src/modules/crud/decision.api.ts +++ b/src/modules/crud/decision.api.ts @@ -90,8 +90,7 @@ export class DecisionApi implements Api { } return new Promise((resolve, rejected) => { - this.addEventListener(editStatusEvent.OPEN, res => { - const data = JSON.parse(res.data); + this.addEventListener(editStatusEvent.OPEN, data => { if (data.errorCode) { let errorMessage = ''; @@ -111,7 +110,7 @@ export class DecisionApi implements Api { }); rejected(data); } else { - resolve(res); + resolve(data); } }); }); diff --git a/types/globals.d.ts b/types/globals.d.ts index a00fd3b..d54e653 100644 --- a/types/globals.d.ts +++ b/types/globals.d.ts @@ -12,7 +12,7 @@ declare const Dec: { socket: { connected: boolean; emit: Function; - originOn: Function; + on: Function; hasListeners: Function; removeListener: Function; };