From 69d3858d6ee726ef7ed48f43ff5c878670187f9b Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 28 十一月 2019 13:31:57 +0800
Subject: [PATCH] 补漏:IOS 的微信登录

---
 ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs |   51 ++++++++++++++++++++++++---------------------------
 1 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
old mode 100755
new mode 100644
index c396c94..76f8dad
--- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
@@ -324,7 +324,7 @@
             }
             else
             {
-                Login(phoneRow.AccountET.Text.Trim(), pwdRow.PasswrodET.Text.Trim());
+                Login(emailRow.AccountET.Text.Trim(), pwdRow.PasswrodET.Text.Trim());
             }
 
         }
@@ -367,14 +367,11 @@
                         {
                             return;
                         }
-                        this.RemoveFromParent();
 
-                        UserPage.Instance.Fresh();
+                        HomePage.Instance.ShowLoginLoadView();
 
                         new System.Threading.Thread(async () =>
                         {
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
                             //瀛樺偍鏁版嵁
                             var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
                             var revertData = responseDataObj;
@@ -395,15 +392,18 @@
                             Config.Instance.Save();
 
                             var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                            var homes = await House.GetHomeLists();
+                            var homes = await House.GetHomeLists();
+                            //鍚姩ZigBee
+                            ZigBee.Common.Application.Init();
                             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                             await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            Shared.Common.Room.CanInitAllRoom = true;
                             Shared.Common.Room.InitAllRoom();
                             Application.RunOnMainThread(() =>
                             {
-                                UserPage.Instance.Fresh();
                                 CommonPage.Loading.Hide();
+                                this.RemoveFromParent();
+                                CommonPage.Instance.RemoveViewByTag("Login");
+                                UserPage.Instance.Fresh();
                             });
                         })
                         { IsBackground = true }.Start();
@@ -510,20 +510,18 @@
                                 if (re)
                                 {
                                     //鐩存帴鐧诲綍
-                                    //this.RemoveFromParent();
-
-                                    //UserPage.Instance.Fresh();
-                                    //鍚姩ZigBee
-                                    ZigBee.Common.Application.Init();
+                                    HomePage.Instance.ShowLoginLoadView();
                                     var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                                    var homes = await House.GetHomeLists();
+                                    var homes = await House.GetHomeLists();
+                                    //鍚姩ZigBee
+                                    ZigBee.Common.Application.Init();
                                     //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                                     await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                                    Shared.Common.Room.CanInitAllRoom = true;
                                     Shared.Common.Room.InitAllRoom();
                                     Application.RunOnMainThread(() =>
                                     {
                                         this.RemoveFromParent();
+                                        CommonPage.Instance.RemoveViewByTag("Login");
                                         UserPage.Instance.Fresh();
                                     });
                                 }
@@ -541,14 +539,14 @@
                             })
                             { IsBackground = true }.Start();
                         }
-                    };
-                //}
-            //};
+                    };
+            //}
+            //};
 #endif
-
+
 #if iOS
-            GateWay.Ios.AppDelegate.WXLogin();
-            GateWay.Ios.AppDelegate.RespAction = (authStr) =>
+            Home.IOS.AppDelegate.WXLogin();
+            Home.IOS.AppDelegate.RespAction = (authStr) =>
             {
                 if (authStr == null)
                 {
@@ -566,13 +564,12 @@
                             //this.RemoveFromParent();
 
                             //UserPage.Instance.Fresh();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
                             var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
                             var homes = await House.GetHomeLists();
+                            //鍚姩ZigBee
+                            ZigBee.Common.Application.Init();
                             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                             await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            Shared.Common.Room.CanInitAllRoom = true;
                             Shared.Common.Room.InitAllRoom();
                             Application.RunOnMainThread(() =>
                             {
@@ -596,9 +593,9 @@
                 }
             };
 #endif
-
-
-
+
+
+
         }
 
         /// <summary>

--
Gitblit v1.8.0