ソースを参照

启动参数修改

hl 1 年間 前
コミット
3b7a70abc6
2 ファイル変更4 行追加3 行削除
  1. 1 1
      src/main.rs
  2. 3 2
      strategy/src/clear_core.rs

+ 1 - 1
src/main.rs

@@ -94,7 +94,7 @@ fn read_params_json() -> Params {
         }
     }
     println!("通讯端口:{}, 配置文件路径:{}", call_port, path);
-    println!("请求指令携带参数:{:?}", args.clone());
+    println!("请求指令携带参数:{:?}",args.clone());
     let mut params = Params::new_json(path, call_port).unwrap();
     if run_mode == 1 {
         params.run_mode = 1;

+ 3 - 2
strategy/src/clear_core.rs

@@ -638,12 +638,13 @@ pub async fn send_clear_msg_request(body_params: &ClearPositionResult) {
     headers.insert("report_token", HeaderValue::from_static("r7T$8gBV!f&L@E2+"));
     headers.insert("auth", HeaderValue::from_static("4L"));
 
+    let body = serde_json::to_string(&body_params).unwrap();
 
     // 发送 POST 请求
     let res = client
         .post("https://t4lapi.skyfffire.com/api/report/searchPositions")
+        .body(body)
         .headers(headers)
-        .json(body_params)
         .send()
         .await;
     match res {
@@ -661,4 +662,4 @@ pub async fn send_clear_msg_request(body_params: &ClearPositionResult) {
             error!("清仓结果上报中控,请求发送失败,异常:{}", e)
         }
     }
-}
+}