This commit is contained in:
老道 2022-10-30 21:03:11 +08:00
parent 4dab9292a4
commit 4051dc6b52
1 changed files with 6 additions and 3 deletions

View File

@ -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