| 12345678910111213141516171819202122232425262728293031323334353637383940 | using System;using System.Collections.Generic;using System.Data.Entity;using System.IO;using System.Linq;using System.Security.Policy;using System.Text;using System.Threading.Tasks;using XdCxRhDW.Entity;namespace XdCxRhDW.Repostory{    public static class SysConfig    {        public static SysSetings Config { get; set; }        public static DateTime ToUtc(this DateTime time)        {            return time.AddHours(-Config.ZoneHours);        }        public static string GetBaseUrl()        {            if (Config == null) return null;            return $"http://{IpHelper.GetLocalIp()}:{Config.HttpPort}/api/";        }        public static string GetUrl(string url)        {            if (Config == null) return null;            if (url.StartsWith("/"))            {                return $"http://{IpHelper.GetLocalIp()}:{Config.HttpPort}/api{url}";            }            else            {                return $"http://{IpHelper.GetLocalIp()}:{Config.HttpPort}/api/{url}";            }        }    }}
 |