Browse Source

调整高拍仪拍照内容(开启高拍仪后暂停1s)

master
胡超1 1 year ago
parent
commit
29bcfa9a2c
  1. 1
      CPF_Cef/Common/ChunkedUpload.cs
  2. 13
      CPF_Cef/MainModel.cs

1
CPF_Cef/Common/ChunkedUpload.cs

@ -119,6 +119,7 @@ namespace AksWebBrowser.Common
// 读取响应内容 // 读取响应内容
string body = await response.Content.ReadAsStringAsync(); string body = await response.Content.ReadAsStringAsync();
ret = body; ret = body;
Log.Info("读取高拍仪响应内容:" + body);
} }
} }
catch (HttpRequestException e) catch (HttpRequestException e)

13
CPF_Cef/MainModel.cs

@ -581,7 +581,8 @@ namespace AksWebBrowser
//} //}
string devindex = GetSnIndex(); string devindex = GetSnIndex();
if (string.IsNullOrEmpty(devindex)) { if (string.IsNullOrEmpty(devindex))
{
devindex = Parame.gpydevIndex; devindex = Parame.gpydevIndex;
} }
//打开高拍仪 //打开高拍仪
@ -594,16 +595,16 @@ namespace AksWebBrowser
} }
else else
{ {
//开启纠偏 Task.Delay(1000).Wait();
EnableDeskImage(1);
//拍照 //拍照
param = getFrame(); param = getFrame();
//Log.Info("img2" + (param)); Task.Delay(1000).Wait();
Log.Info("拍照结果img2:" + (param));
if (string.IsNullOrEmpty(param)) if (string.IsNullOrEmpty(param))
{ {
//关闭 //关闭
StopSn(devindex); 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"); SubmitLogs(result, "openCamera");
return result; return result;
} }
@ -1073,6 +1074,8 @@ namespace AksWebBrowser
//开始播放 //开始播放
command = $"sox {url} -d"; command = $"sox {url} -d";
ShllCommad(command); ShllCommad(command);
//执行命令
Log.Info("执行命令:" + command);
//AutoAudio(ispaly, path); //AutoAudio(ispaly, path);
}); });
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}"; string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}";

Loading…
Cancel
Save