From c404f2f369710fe72bbcc4cff2b7b8a2c11b5ff1 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 02 三月 2021 17:48:32 +0800
Subject: [PATCH] Merge branch 'master' into wjc

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs |   67 ++++++++++-----------------------
 1 files changed, 20 insertions(+), 47 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
index 156c47f..570c048 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
@@ -957,58 +957,31 @@
                 }
             }
 
-            GotoHomePage ();
+            //GotoHomePage ();
+            UploadOidAndSidList ();
 
         }
 
+        /// <summary>
+        /// 涓婁紶oid鍜宻id鍒楄〃
+        /// </summary>
+        void UploadOidAndSidList ()
+        {
 
-        ///// <summary>
-        ///// Gateway setting succeeded锛宒ata up.Please wait...
-        ///// 缁戝畾Mac(鍗板害鐗�)
-        ///// </summary>
-        //void BindGatewaysNew ()
-        //{
-        //    //Application.RunOnMainThread (() => {
-        //    //    MainPage.Loading.Start ("Gateway setting succeeded锛宒ata up. Please wait...");
-        //    //});
-        //    //IO.FileUtils.SaveEquipmentMessage (gatewayDeicve);
-        //    //var gatewayMAC = gatewayDeicve.MAC.Replace (".", "");
+            Application.RunOnMainThread (() => {
+                MainPage.Loading.Start ("Uploading device list...");
+            });
+            var RES = HDLLinkUtlis.Current.UploadOidAndSidList ();
+            Application.RunOnMainThread (() => {
+                if (RES) {
+                    //Utlis.ShowTip ("Device list upload successfully锛�");
+                } else {
+                    Utlis.ShowTip ("Device list upload failed锛�");
+                }
+                GotoHomePage ();
+            });
 
-        //    ////璧版柊鏇存柊缁戝畾鎺ュ彛
-        //    //var mBindMacObj = new BindMacObj () {
-        //    //    LoginAccessToken = MainPage.LoginUser.LoginTokenString,
-        //    //    HomeId = UserConfig.Instance.CurrentRegion.Id,
-        //    //    MAC = gatewayMAC
-
-        //    //};
-
-        //    //string urlHead = MainPage.RequestHttpsHost;
-        //    //if (mBindMacObj.IsOtherAccountCtrl) {
-        //    //    urlHead = UserConfig.Instance.MasterAccountRequestBaseUrl;
-        //    //    mBindMacObj.LoginAccessToken = UserConfig.Instance.MasterAccountToken;
-        //    //}
-
-
-        //    //var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (mBindMacObj);
-
-        //    ////var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (new EditMACByHomeId { RegionID = UserConfig.Instance.CurrentRegion.Id, MAC = gatewayMAC, IsReBind = true });
-        //    //var respone = MainPage.RequestHttps (API.BindMac, requestJson, urlHead);
-        //    //if (respone.StateCode.ToUpper () != StateCode.SUCCESS) {
-        //    //    GetNowHomeGatewayAfterBindMacFailed ();//2020-01-11
-        //    //    Application.RunOnMainThread (() => {
-        //    //        new Alert ("", $"Failed to bind Mac address! {ErrorCode.Reason }{respone.StateCode}", Language.StringByID (R.MyInternationalizationString.Close)).Show ();
-        //    //        if (MainPage.LoginUser.AccountString == "464027401@qq.com") {
-        //    //            new Alert (respone.StateCode, respone.ErrorInfo, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
-        //    //        }
-        //    //    });
-        //    //    return;
-        //    //}
-        //    //GetNowHomeGateway ();
-
-        //    var gatewayMAC = gatewayDeicve.MAC.Replace (".", "");
-        //    AddMacToUserConfig (gatewayMAC);
-
-        //}
+        }
 
         /// <summary>
         /// 璺宠浆涓婚〉闈�

--
Gitblit v1.8.0