From 7ae02d5e1d1fbd693fb8b078174b4a5c404ca27d Mon Sep 17 00:00:00 2001 From: fyf Date: Wed, 4 May 2022 10:32:07 +0800 Subject: [PATCH] 1 --- DataVAPI.Model/JsonMsg.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/DataVAPI.Model/JsonMsg.cs b/DataVAPI.Model/JsonMsg.cs index 62a9983..0de3cb9 100644 --- a/DataVAPI.Model/JsonMsg.cs +++ b/DataVAPI.Model/JsonMsg.cs @@ -29,12 +29,12 @@ namespace DataVAPI.Model /// /// 内容 /// - public T obj { get; set; } + public IOTData obj { get; set; } - /// - /// 返回数据 - /// - public IOTData oTData { get; set; } + ///// + ///// 返回数据 + ///// + //public IOTData oTData { get; set; } /// /// 图标 @@ -50,7 +50,7 @@ namespace DataVAPI.Model Console.WriteLine(str); Console.ForegroundColor = currentForeColor; ; - return new JsonMsg() { code = 1, ms = mso, msg = "成功", obj = obj, icon = 1, oTData = new IOTData { data = obj } }; + return new JsonMsg() { code = 1, ms = mso, msg = "成功", obj = new IOTData { data = obj }, icon = 1}; } public static JsonMsg Error(T obj, string msg = "接口名称", string mso = "调用接口成功失败") @@ -60,7 +60,7 @@ namespace DataVAPI.Model Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(str); Console.ForegroundColor = currentForeColor; - return new JsonMsg() { code = 0, ms = mso, msg = "失败", obj = obj, icon = 1, oTData = new IOTData { data = obj } }; + return new JsonMsg() { code = 0, ms = mso, msg = "失败",icon = 1, obj = new IOTData { data = obj } }; } }