1
pulg
2025-05-27 bc3d7a828114cb9df154da869ec986cf6733a779
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文件", "值timeSpan失败!原因:" + ex.Message);
                return "";
            }
        }
    }