From bdb67e76871e6ad47c353cd0350a1ac04d913823 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 23 十二月 2020 13:32:25 +0800
Subject: [PATCH] 20201223-5

---
 HDL_ON/DAL/Server/HttpServerRequest.cs |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index e31e88c..19c8c8a 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -503,7 +503,7 @@
                                 UserInfo.Current.SaveUserInfo();
                                 Action action = () =>
                                 {
-                                    MainPage.GoUserPage();
+                                    MainPage.GoUserPage(true);
                                 };
                                 new UI.PublicAssmebly().TipMsg(StringId.Tip, StringId.ResidenceDeletedSwitchToAnotherResidence, action);
                             });
@@ -553,11 +553,11 @@
         /// <summary>
         /// 鑾峰彇鍒锋柊褰撳墠浣忓畢鐨勭綉鍏冲垪琛�
         /// </summary>
-        public void GetHomeGatewayList()
+        public string GetHomeGatewayList()
         {
             try
             {
-                if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) return;
+                if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) return "";
                 var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.RegionID;
                 var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = nowhomeId });
                 var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_GetGatewayList, requestJson);
@@ -571,7 +571,7 @@
                             if (mHomeGatewayRes.Count > 0)
                             {
                                 DB_ResidenceData.Instance.HomeGateway = mHomeGatewayRes[0];
-                                if(mHomeGatewayRes[0].gatewayStatus)
+                                if (mHomeGatewayRes[0].gatewayStatus)
                                 {
                                     //DriverLayer.Control.Ins.IsRemote = true;
                                     DriverLayer.Control.Ins.GatewayOnline = true;
@@ -581,7 +581,7 @@
                                     DriverLayer.Control.Ins.GatewayOnline = false;
                                 }
                                 DB_ResidenceData.Instance.SaveResidenceData();
-                                return;
+                                return revertObj.Code;
                             }
                         }
                         //鍏朵綑鎯呭喌娓呯┖缃戝叧淇℃伅
@@ -593,10 +593,11 @@
                 {
                     //鎻愮ず閿欒
                 }
+                return revertObj.Code;
             }
             catch
             {
-
+                return "";
             }
         }
         /// <summary>

--
Gitblit v1.8.0