From 564c5ac01c1650bf59f7fee5a6c9c372f42c3c9d Mon Sep 17 00:00:00 2001 From: hans Date: Tue, 23 Jul 2024 12:02:30 +0800 Subject: [PATCH] =?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; };