From f4c9d8aed59049476cfbf7b08e59936bbd80a6c9 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 08 十二月 2020 17:27:53 +0800
Subject: [PATCH] 2020-12-08 1.增加分享设备的时候,判断当前房间分享设备总数,从而决定是否需要增加或者移除房间分享

---
 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