From 16deafb8aca7709877907ba938ea31407f6d2834 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 09 十二月 2020 15:39:34 +0800 Subject: [PATCH] 20201209 --- 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