From 28bea7128b8c24a6a664e880f1425e1fa24b9b5f Mon Sep 17 00:00:00 2001 From: pulg <plg@Haninfo> Date: 星期四, 05 六月 2025 17:19:49 +0800 Subject: [PATCH] 11 --- HH.WCS.ZCQTJ/util/STAttribute .cs | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/HH.WCS.ZCQTJ/util/STAttribute .cs b/HH.WCS.ZCQTJ/util/STAttribute .cs index a4dc5bc..8981c2c 100644 --- a/HH.WCS.ZCQTJ/util/STAttribute .cs +++ b/HH.WCS.ZCQTJ/util/STAttribute .cs @@ -43,7 +43,28 @@ } } + public static string GetValueTwo(string name) + { + try + { + var jsonFile = System.AppDomain.CurrentDomain.BaseDirectory + "Config\\Config.json"; + using (System.IO.StreamReader file = System.IO.File.OpenText(jsonFile)) + { + using (JsonTextReader reader = new JsonTextReader(file)) + { + JObject o = (JObject)JToken.ReadFrom(reader); + var value = o[name].ToString(); + return value.Replace("\r\n", ""); + } + } + } + catch (Exception ex) + { + LogHelper.DanInfo("鑾峰彇json鏂囦欢", "鍊紅imeSpan澶辫触锛佸師鍥狅細" + ex.Message); + return ""; + } + } } -- Gitblit v1.9.1