From 29bcfa9a2cfb79ce5457b02c7b7290e88188c8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=BD=87=E9=98=B3?= Date: Tue, 9 Jul 2024 14:48:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=AB=98=E6=8B=8D=E4=BB=AA?= =?UTF-8?q?=E6=8B=8D=E7=85=A7=E5=86=85=E5=AE=B9=EF=BC=88=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E9=AB=98=E6=8B=8D=E4=BB=AA=E5=90=8E=E6=9A=82=E5=81=9C1s?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPF_Cef/Common/ChunkedUpload.cs | 1 + CPF_Cef/MainModel.cs | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CPF_Cef/Common/ChunkedUpload.cs b/CPF_Cef/Common/ChunkedUpload.cs index f021358..98ca11c 100644 --- a/CPF_Cef/Common/ChunkedUpload.cs +++ b/CPF_Cef/Common/ChunkedUpload.cs @@ -119,6 +119,7 @@ namespace AksWebBrowser.Common // 读取响应内容 string body = await response.Content.ReadAsStringAsync(); ret = body; + Log.Info("读取高拍仪响应内容:" + body); } } catch (HttpRequestException e) diff --git a/CPF_Cef/MainModel.cs b/CPF_Cef/MainModel.cs index 815b2ce..a9289ba 100644 --- a/CPF_Cef/MainModel.cs +++ b/CPF_Cef/MainModel.cs @@ -581,7 +581,8 @@ namespace AksWebBrowser //} string devindex = GetSnIndex(); - if (string.IsNullOrEmpty(devindex)) { + if (string.IsNullOrEmpty(devindex)) + { devindex = Parame.gpydevIndex; } //打开高拍仪 @@ -594,16 +595,16 @@ namespace AksWebBrowser } else { - //开启纠偏 - EnableDeskImage(1); + Task.Delay(1000).Wait(); //拍照 param = getFrame(); - //Log.Info("img2" + (param)); + Task.Delay(1000).Wait(); + Log.Info("拍照结果img2:" + (param)); if (string.IsNullOrEmpty(param)) { //关闭 StopSn(devindex); - string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "获取图片失败" + "\"}"; + string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "扫描失败,请重新扫描" + "\"}"; SubmitLogs(result, "openCamera"); return result; } @@ -1073,6 +1074,8 @@ namespace AksWebBrowser //开始播放 command = $"sox {url} -d"; ShllCommad(command); + //执行命令 + Log.Info("执行命令:" + command); //AutoAudio(ispaly, path); }); string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}"; @@ -2048,7 +2051,7 @@ namespace AksWebBrowser } return tempFile; } - + /// /// 是否已获取收取 /// @@ -2257,7 +2260,7 @@ namespace AksWebBrowser process.WaitForExit(); } } - + public static string ReadByBody() { Task.Run(async () => @@ -2267,7 +2270,7 @@ namespace AksWebBrowser @event11.WaitOne(); return body; } - + /// /// 读取业务数据 ///