|
|
@@ -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);
|
|
|
- });
|
|
|
-}
|