From 145b157ba183ebf877c93ed2dbb01ec737c993d3 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 08 十二月 2020 18:59:33 +0800 Subject: [PATCH] Merge branch 'WJC' --- HDL_ON/DAL/Server/HttpUtil.cs | 49 ++++++++++++++++++++++++++----------------------- 1 files changed, 26 insertions(+), 23 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 0e405b0..e7fa703 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -152,16 +152,16 @@ try { - //if (string.IsNullOrEmpty(urlHead)) - //{ - // urlHead = UserInfo.Current.RequestHttpsHost; - //} - //string requestFullUrl = urlHead + apiPath; + if (string.IsNullOrEmpty(urlHead)) + { + urlHead = UserInfo.Current.RequestHttpsHost; + } + string requestFullUrl = urlHead + apiPath; - //**************娴嬭瘯************** - string requestFullUrl = GlobalRequestHttpsHost + apiPath; - //**************娴嬭瘯************** + ////**************娴嬭瘯************** + //string requestFullUrl = GlobalRequestHttpsHost + apiPath; + ////**************娴嬭瘯************** RestClient client = new RestClient(requestFullUrl); @@ -265,14 +265,15 @@ #region RestRequest try { - //if (string.IsNullOrEmpty (urlHead)) { - // urlHead = UserInfo.Current.RequestHttpsHost; - //} - //string requestFullUrl = urlHead + apiPath; + if (string.IsNullOrEmpty(urlHead)) + { + urlHead = UserInfo.Current.RequestHttpsHost; + } + string requestFullUrl = urlHead + apiPath; - //**************娴嬭瘯************** - string requestFullUrl = GlobalRequestHttpsHost + apiPath; - //**************娴嬭瘯************** + ////**************娴嬭瘯************** + //string requestFullUrl = GlobalRequestHttpsHost + apiPath; + ////**************娴嬭瘯************** RestClient client = new RestClient(requestFullUrl); //client.Timeout = mTimeout * 1000; @@ -335,14 +336,15 @@ try { - //if (string.IsNullOrEmpty (urlHead)) { - // urlHead = UserInfo.Current.RequestHttpsHost; - //} - //string requestFullUrl = urlHead + apiPath; + if (string.IsNullOrEmpty(urlHead)) + { + urlHead = UserInfo.Current.RequestHttpsHost; + } + string requestFullUrl = urlHead + apiPath; - //**************娴嬭瘯************** - string requestFullUrl = GlobalRequestHttpsHost + apiPath; - //**************娴嬭瘯************** + ////**************娴嬭瘯************** + //string requestFullUrl = GlobalRequestHttpsHost + apiPath; + ////**************娴嬭瘯************** RestClient client = new RestClient(requestFullUrl); //client.Timeout = mTimeout * 1000; @@ -470,7 +472,8 @@ static string GetTimestamp() { System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯 - return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 鐩稿樊绉掓暟 + return ((long)(DateTime.Now - startTime).TotalMilliseconds).ToString(); // 鐩稿樊绉掓暟 + //return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 鐩稿樊绉掓暟 } /// <summary> -- Gitblit v1.8.0