瀏覽代碼

binan 接口提交

875428575@qq.com 2 年之前
父節點
當前提交
615f54ab1a
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/exchange_libs.rs

+ 3 - 3
src/exchange_libs.rs

@@ -402,10 +402,10 @@ impl OkxExc {
                 } else {
                     let body: String = req_data.data;
                     let json_value: serde_json::Value = serde_json::from_str(&body).unwrap();
-                    
-                    let code = serde_json::to_string(&json_value["code"]).unwrap();
+
+                    let code = json_value["code"].as_str().unwrap();
                     let data = serde_json::to_string(&json_value["data"]).unwrap();
-                    let msg = serde_json::to_string(&json_value["msg"]).unwrap();
+                    let msg = json_value["msg"].as_str().unwrap();
 
                     // println!("--解析成功----code:{}",code);
                     // println!("--解析成功----data:{}",data);