huangbin 4 years ago
parent
commit
26786651be
1 changed files with 0 additions and 29 deletions
  1. 0 29
      src/services/socket/error/index.ts

+ 0 - 29
src/services/socket/error/index.ts

@@ -1,29 +0,0 @@
-import APP from '@/services';
-import { buildProtoReq50, parseProtoRsp50 } from '@/services/socket/protobuf/buildReq';
-import { Callback } from '@/utils/websocket/index';
-
-/**
- * funcode查找错误码
- */
-export function queryErrorCode(): Promise<string> {
-    return new Promise((resolve, reject) => {
-        const params = {
-            protobufName: 'ErrorCodeQueryReq',
-            funCodeName: 'ErrorCodeQueryReq',
-            reqParams: { errorcodeUTime: APP.get('lastUpdateTime').errorcodeUTime },
-        };
-        const package50 = buildProtoReq50(params);
-        APP.sendTradingServer(package50, undefined, {
-            onSuccess: (res) => {
-                const { isSuccess, result } = parseProtoRsp50(res, 'ErrorCodeQueryRsp');
-                if (isSuccess) {
-                    // APP.set('errorCodeList', result.ErrorCodeList);
-                    resolve('ok');
-                } else {
-                    reject(result);
-                }
-            },
-            onFail: (err) => reject(err.message),
-        } as Callback);
-    });
-}