From d95ad054d58954b6513745b66893b4c5a6c7e028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=BD=87=E9=98=B3?= Date: Wed, 31 Jul 2024 14:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=9C=AC=E5=9C=B0=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPF_Cef/MainModel.cs | 6 +++--- CPF_Cef/Parame.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CPF_Cef/MainModel.cs b/CPF_Cef/MainModel.cs index 82da99b..dc575b5 100644 --- a/CPF_Cef/MainModel.cs +++ b/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) { diff --git a/CPF_Cef/Parame.cs b/CPF_Cef/Parame.cs index e5aef54..bd57d4d 100644 --- a/CPF_Cef/Parame.cs +++ b/CPF_Cef/Parame.cs @@ -22,7 +22,7 @@ namespace AksWebBrowser public static WebSocketClientWithHeartbeat webSocket2 { get; set; } public static List 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; //是否开启高拍仪