Browse Source

更新超时时间

master
胡超1 1 year ago
parent
commit
3924cd5562
  1. 2
      CPF_Cef/Common/ChunkedUpload.cs
  2. 2
      CPF_Cef/FrmMain.cs
  3. 34
      CPF_Cef/MainModel.cs
  4. 4
      CPF_Cef/Parame.cs

2
CPF_Cef/Common/ChunkedUpload.cs

@ -148,6 +148,7 @@ namespace AksWebBrowser.Common
{
try
{
timeout = timeout == 0 ? Parame.timeout : timeout;
var client = new HttpClient();
client.Timeout = TimeSpan.FromSeconds(timeout);
@ -448,6 +449,5 @@ namespace AksWebBrowser.Common
}
}
}
}
}

2
CPF_Cef/FrmMain.cs

@ -121,6 +121,8 @@ namespace AKS.EnterpriseLibrary.WebBrowser
{
Parame.isGPY = true;
}
//开启/关闭纠偏显示
MainModel.EnableDeskImage(1);
}
public void Writelog(string str, string dirName = @"logs")

34
CPF_Cef/MainModel.cs

@ -3,6 +3,7 @@ using AksWebBrowser.Common;
using AksWebBrowser.Devices;
using AKSWebBrowser.Commen;
using Fleck;
using LibVLCSharp.Shared;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@ -591,10 +592,6 @@ namespace AKS.EnterpriseLibrary.WebBrowser
Task.Run(() => {HttpPostResponseBySign("open", 1, param.code, param.timeout); });
@event3.WaitOne();
string result = sginStr;
if (sginStr.Contains(""))
{
result = " {\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"png\",\"data\":\"" + "在规定时间内未签字" + "\"}";
}
SubmitLogs(result, "OpenSign");
return result;
}
@ -1209,6 +1206,35 @@ namespace AKS.EnterpriseLibrary.WebBrowser
}
}
/// <summary>
/// 开启/关闭纠偏显示
/// </summary>
/// <returns></returns>
public static string EnableDeskImage(int idx)
{
//获取设备信息
string param = "/EnableDeskImage?enable=" + idx;
Task.Run(() => HttpResponse(param));
@event6.WaitOne();
if (string.IsNullOrEmpty(gpyStr))
{
return "";
}
else
{
JObject jo = (JObject)JsonConvert.DeserializeObject(gpyStr);
if (jo["returnCode"].ToString() == "2" || jo["returnCode"].ToString() == "0")
{
return "200";
}
else
{
// // Log.Info(jo["returnMsg"].ToString());
return "";
}
}
}
/// <summary>
/// 拍照
/// </summary>

4
CPF_Cef/Parame.cs

@ -30,8 +30,8 @@ namespace AksWebBrowser
//高拍仪devIndex
public static string gpydevIndex = "0";
//签字版、指纹、身份证
public static string signUrl = "http://127.0.0.1:9399/device";
public static int timeout= 60;
public static string signUrl = "http://192.168.0.234:9399/device";
public static int timeout = 3000;
//票据打印机
public static string pritPj = "/dev/ttyS7";
//波特率

Loading…
Cancel
Save