From 9dce5facf5c6aa29928880a0fa2fbfc7366a6dad Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 08 十二月 2020 15:00:57 +0800
Subject: [PATCH] 2020-12-08 1.修改回动态切换域名,用户相关接口使用用户域名,住宅相关接口用住宅的域名。

---
 HDL_ON/DAL/Server/HttpUtil.cs          |   46 ++++++++++++-----------
 HDL_ON/DAL/Server/HttpServerRequest.cs |    2 
 .vs/HDL_APP_Project/xs/UserPrefs.xml   |   16 ++++++--
 3 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 1937f58..ef261b8 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,6 +1,13 @@
 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
-  <MonoDevelop.Ide.Workbench>
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Entity/UserInfo.cs">
+    <Files>
+      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="157" Column="54" />
+      <File FileName="HDL_ON/UI/UI1-Login/SelectServerDialog.cs" Line="74" Column="119" />
+      <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="15" Column="29" />
+      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="102" Column="40" />
+      <File FileName="HDL_ON/Entity/UserInfo.cs" Line="56" Column="39" />
+    </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
@@ -11,6 +18,9 @@
                 <Node name="Mqtt" expanded="True" />
                 <Node name="Server" expanded="True" />
               </Node>
+              <Node name="Entity" expanded="True">
+                <Node name="UserInfo.cs" selected="True" />
+              </Node>
               <Node name="UI" expanded="True">
                 <Node name="CSS" expanded="True" />
                 <Node name="UI0-Public" expanded="True">
@@ -18,9 +28,7 @@
                 </Node>
                 <Node name="UI1-Login" expanded="True" />
                 <Node name="UI2" expanded="True">
-                  <Node name="2-Classification" expanded="True">
-                    <Node name="ClassificationPage.cs" selected="True" />
-                  </Node>
+                  <Node name="2-Classification" expanded="True" />
                   <Node name="3-Intelligence" expanded="True">
                     <Node name="Scene" expanded="True" />
                   </Node>
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 09c3ea8..f3f01b9 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -99,7 +99,7 @@
         public ResponsePackNew GetRegionByAccount(string account)
         {
             var requestJson = HttpUtil.GetSignRequestJson(new RegionByAccountObj() { account = account });
-            return HttpUtil.RequestHttpsPost(NewAPI.API_POST_GetRegionByAccount, requestJson);
+            return HttpUtil.RequestHttpsPost(NewAPI.API_POST_GetRegionByAccount, requestJson, HttpUtil.GlobalRequestHttpsHost);
         }
 
         /// <summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 84a5333..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;

--
Gitblit v1.8.0