From 4051dc6b5247f11affd46ef5be8b4c110b674035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=88=E6=A3=AE=E5=90=B4?= <8402134@qq.com> Date: Sun, 30 Oct 2022 21:03:11 +0800 Subject: [PATCH] 1 --- 类库/Api.Framework/Cps/BaseCpsApi.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/类库/Api.Framework/Cps/BaseCpsApi.cs b/类库/Api.Framework/Cps/BaseCpsApi.cs index 27845f0..d26bf7d 100644 --- a/类库/Api.Framework/Cps/BaseCpsApi.cs +++ b/类库/Api.Framework/Cps/BaseCpsApi.cs @@ -12,6 +12,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using Newtonsoft.Json; namespace Api.Framework.Cps { @@ -207,7 +208,7 @@ namespace Api.Framework.Cps Host = CpsClient._host + "api/" + target + "/send_data", Method = method }; - + if (param != null) { var _param = param.GetType().GetProperties(); @@ -217,13 +218,15 @@ namespace Api.Framework.Cps } } HttpHelper http = new HttpHelper(); + WebResult result = null; try { - //var ss = http.SendData(end); - return http.SendData(end); + result = http.SendData(end); + return result; } catch (Exception ex) { + LogHelper.GetSingleObj().Error("cps请求异常", ex.Message + $"{result?.message} => {JsonConvert.SerializeObject(end)}"); if (ex.Message == "未将对象引用设置到对象的实例。") return null; else