From 99b8175d52570c020b5f4d37fa489bd05a309eb0 Mon Sep 17 00:00:00 2001 From: xxe Date: Fri, 23 Sep 2022 10:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E5=8D=A1=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HKCardOUT/Helper/DataBus.cs | 2 +- HKCardOUT/Logic/RemoteService.cs | 8 +++++--- HKCardOUT/ViewModels/RootViewModel.cs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/HKCardOUT/Helper/DataBus.cs b/HKCardOUT/Helper/DataBus.cs index 5cbf872..1b7811c 100644 --- a/HKCardOUT/Helper/DataBus.cs +++ b/HKCardOUT/Helper/DataBus.cs @@ -37,7 +37,7 @@ namespace HKCardOUT.Helper /// /// 检查卡的状态 /// - public static string CheckCardStatus = DataBus.SaasRoute + "api/member-helper/membercardinfo/"; + public static string CheckCardStatus = DataBus.SaasRoute + "api/member-helper/membercardinfo"; /// /// 同步消费记录 /// diff --git a/HKCardOUT/Logic/RemoteService.cs b/HKCardOUT/Logic/RemoteService.cs index d5be8d7..f6a00f5 100644 --- a/HKCardOUT/Logic/RemoteService.cs +++ b/HKCardOUT/Logic/RemoteService.cs @@ -24,9 +24,11 @@ namespace HKCardOUT.Logic { var data = IHttpMultiClient.HttpMulti.AddNode(t => { - t.NodePath = ApiRoute.CheckCardStatus + CardNo; - }).Build().RunStringFirst().ToModel()["data"]["cardState"].ToString().AsInt(); - return data; + t.NodePath = ApiRoute.CheckCardStatus; + t.ReqType = MultiType.POST; + t.JsonParam = (new { cardNum = CardNo }).ToJson(); + }).Build().RunStringFirst().ToModel()["data"]["cardState"]; + return data != null ? data.ToString().AsInt() : 0; } /// /// 同步消费记录 diff --git a/HKCardOUT/ViewModels/RootViewModel.cs b/HKCardOUT/ViewModels/RootViewModel.cs index 0b33f1e..b66823f 100644 --- a/HKCardOUT/ViewModels/RootViewModel.cs +++ b/HKCardOUT/ViewModels/RootViewModel.cs @@ -113,7 +113,7 @@ namespace HKCardOUT.ViewModels } else { - var x = await UHF_RS485_Helper.GetInstance().ReadCard(01); + var x = await UHF_RS485_Helper.GetInstance().ReadCard(item.Address.AsInt()); if (x != null) ReadFunc?.Invoke(x); }