Browse Source

REPORT-126948 合并WebSocket的namespace和event FBP部分 数据结构调整

research/mss-2.0
hans 4 months ago
parent
commit
564c5ac01c
  1. 5
      src/modules/crud/decision.api.ts
  2. 2
      types/globals.d.ts

5
src/modules/crud/decision.api.ts

@ -90,8 +90,7 @@ export class DecisionApi implements Api {
} }
return new Promise((resolve, rejected) => { return new Promise((resolve, rejected) => {
this.addEventListener(editStatusEvent.OPEN, res => { this.addEventListener(editStatusEvent.OPEN, data => {
const data = JSON.parse(res.data);
if (data.errorCode) { if (data.errorCode) {
let errorMessage = ''; let errorMessage = '';
@ -111,7 +110,7 @@ export class DecisionApi implements Api {
}); });
rejected(data); rejected(data);
} else { } else {
resolve(res); resolve(data);
} }
}); });
}); });

2
types/globals.d.ts vendored

@ -12,7 +12,7 @@ declare const Dec: {
socket: { socket: {
connected: boolean; connected: boolean;
emit: Function; emit: Function;
originOn: Function; on: Function;
hasListeners: Function; hasListeners: Function;
removeListener: Function; removeListener: Function;
}; };

Loading…
Cancel
Save