From 780e34b3f06f9709150183711ffddd19f97e070d Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 25 十二月 2020 10:11:19 +0800
Subject: [PATCH] 20201225-3

---
 HDL_ON/DAL/Server/HttpServerRequest.cs |    2 +-
 .vs/HDL_APP_Project/xs/UserPrefs.xml   |   18 ++++++++++++------
 HDL_ON/DAL/Mqtt/MqttClient.cs          |   16 +++++++++++++++-
 HDL_ON/UI/UI1-Login/LoginPage.cs       |    2 +-
 4 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index de37053..4382ae3 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,10 +1,13 @@
 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpServerRequest.cs">
     <Files>
-      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="608" Column="13" />
+      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="164" Column="17" />
       <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs" Line="214" Column="63" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs" Line="1" Column="1" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs" Line="20" Column="21" />
+      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="200" Column="50" />
+      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="94" Column="54" />
+      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="605" Column="23" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
@@ -13,14 +16,17 @@
             <Node name="HDL_ON" expanded="True">
               <Node name="Common" expanded="True" />
               <Node name="DAL" expanded="True">
+                <Node name="DriverLayer" expanded="True" />
                 <Node name="Mqtt" expanded="True" />
+                <Node name="Server" expanded="True">
+                  <Node name="HttpServerRequest.cs" selected="True" />
+                </Node>
               </Node>
               <Node name="UI" expanded="True">
+                <Node name="UI1-Login" expanded="True" />
                 <Node name="UI2" expanded="True">
                   <Node name="FuntionControlView" expanded="True">
-                    <Node name="Light" expanded="True">
-                      <Node name="ColorTureLampPageBLL.cs" selected="True" />
-                    </Node>
+                    <Node name="Light" expanded="True" />
                   </Node>
                 </Node>
               </Node>
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index f61aa02..7dee091 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -160,6 +160,10 @@
         }
 
         static bool isSubscribeSuccess;
+        /// <summary>
+        /// 璁㈤槄涓婚
+        /// </summary>
+        /// <returns></returns>
         static async Task SubscribeTopics()
         {
             if (remoteIsConnected && !isSubscribeSuccess)
@@ -659,7 +663,17 @@
             if (Control.Ins.IsRemote)
             {
                 if (!Control.Ins.GatewayOnline)
-                    Control.Ins.GatewayOnline = true;
+                {
+                    try
+                    {
+                        if (DB_ResidenceData.Instance.HomeGateway != null)
+                        {
+                            DB_ResidenceData.Instance.HomeGateway.gatewayStatus = true;
+                        }
+                        Control.Ins.GatewayOnline = true;
+                    }
+                    catch { }
+                }
             }
         }
 
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 5b5b29c..c27acef 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -607,7 +607,7 @@
             Dictionary<string, object> d = new Dictionary<string, object>();
             d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
             d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
-            string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d);
+            var jsonString = HttpUtil.GetSignRequestJson(d);
             var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGatewayInfo, jsonString);
             if (revertObj.Code == StateCode.SUCCESS)
             {
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index ac7893c..6460067 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -197,7 +197,7 @@
                 }
                 else
                 {
-                    etAccount.Text = "13375012446";//13375012446
+                    etAccount.Text = "13602944661";//13375012446
                 }
                 b = !b;
                 etPassword.Text = "123456";

--
Gitblit v1.8.0