Browse Source

调用本地服务

master
胡超1 12 months ago
parent
commit
d95ad054d5
  1. 6
      CPF_Cef/MainModel.cs
  2. 4
      CPF_Cef/Parame.cs

6
CPF_Cef/MainModel.cs

@ -1676,14 +1676,14 @@ namespace AksWebBrowser
{
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}";
}
string faceA = Utils.Base64ByImagesPath(param.faceA, "faceA");
string faceB = Utils.Base64ByImagesPath(param.faceB, "faceB");
string faceA = Utils.Base64ByImagesPath(param.faceA.Replace("data:image/jpg;base64,",""), "faceA");
string faceB = Utils.Base64ByImagesPath(param.faceB.Replace("data:image/jpg;base64,",""), "faceB");
var mode2 = new
{
filePathA = faceA,
filePathB = faceB
};
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + JsonConvert.SerializeObject(mode2) + "\"}";
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":" + JsonConvert.SerializeObject(mode2) + "}";
}
catch (Exception ex)
{

4
CPF_Cef/Parame.cs

@ -22,7 +22,7 @@ namespace AksWebBrowser
public static WebSocketClientWithHeartbeat webSocket2 { get; set; }
public static List<Func> FuncObject { get; set; }
//接口地址
public static string apiUrl = "http://192.168.0.234:8098";//"http://143.169.62.3:8098";//
public static string apiUrl ="http://127.0.0.1:8098";//"http://143.169.62.3:8098";//
//授权key
public static string key = "1";
//硬件Ip
@ -42,7 +42,7 @@ namespace AksWebBrowser
//波特率
public static int pritPjPort = 38400;
//打印名字
public static string PrinterName = "Lexmark-MS430-Series";
public static string PrinterName = "Lexmark-CS430-Series";
//是否启用双目
public static bool isSM = true;
//是否开启高拍仪

Loading…
Cancel
Save