Explorar el Código

commit proto 接口提交

yu jie hace 4 años
padre
commit
a79289bb18

+ 6 - 0
src/services/funcode/index.ts

@@ -157,4 +157,10 @@ export const funCode: Code = {
 
     QHJAgreementConfigOperateReq: 1900733,  /// 协议操作请求
     QHJAgreementConfigOperateRsp: 1900734,  /// 协议操作响应
+
+    HdWROrderReq: 1441807,  ///  持仓单挂牌请求
+    HdWROrderRsp: 1441808,  ///  持仓单挂牌应答
+
+    HdWRDealOrderReq: 1441809, ///  持仓单摘牌请求
+    HdWRDealOrderRsp: 1441810, ///  持仓单摘牌应答
 };

+ 20 - 0
src/services/proto/warehousetrade/index.ts

@@ -0,0 +1,20 @@
+import {protoMiddleware} from "@/services/socket/protobuf/buildReq";
+import {HdWRDealOrderReq, HdWROrderReq} from "@/services/proto/warehousetrade/interface";
+
+
+/**
+ * 持仓单挂牌请求
+ * @param param
+ */
+export const hdWROrder = (param: HdWROrderReq): Promise<any> => {
+    return protoMiddleware<HdWROrderReq>(param, 'HdWROrderReq', 'HdWROrderRsp', 2)
+}
+
+/**
+ * 持仓单摘牌请求
+ * @param param
+ * @constructor
+ */
+export const HdWRDealOrder = (param: HdWRDealOrderReq): Promise<any> => {
+    return protoMiddleware<HdWRDealOrderReq>(param, 'HdWRDealOrderReq', 'HdWRDealOrderRsp', 2)
+}

+ 5 - 5
src/services/request/serviceURL.ts

@@ -80,10 +80,10 @@ export const setServiceURL = (config: URL): void => {
     // console.log('URL', config);
     //外网环境(175),外包同事使用
     serviceURL = config;
-    if (process.env.NODE_ENV === 'development') {
-        serviceURL.goCommonSearchUrl = 'http://218.17.158.45:21001/api';
-        serviceURL.quoteUrl = 'ws://218.17.158.45:21004';
-        serviceURL.tradeUrl = 'ws://218.17.158.45:21005';
-    }
+    // if (process.env.NODE_ENV === 'development') {
+    //     serviceURL.goCommonSearchUrl = 'http://218.17.158.45:21001/api';
+    //     serviceURL.quoteUrl = 'ws://218.17.158.45:21004';
+    //     serviceURL.tradeUrl = 'ws://218.17.158.45:21005';
+    // }
     console.log(serviceURL);
 };