From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 09:07:13 +0800
Subject: [PATCH] 新云端Ver1.3

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs |   44 ++++++++++++++++++++------------------------
 1 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
index 89f9c6e..cbe5d50 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
@@ -10,7 +10,7 @@
         /// 鏋勯�犲嚱鏁�
         /// </summary>
         /// <param name="doorLock"></param>
-        public UndistributeDoorlockUserPage(ZigBee.Device.DoorLock doorLock, List<Shared.Phone.UserCenter.MemberInfoRes> localAccountList)
+        public UndistributeDoorlockUserPage(ZigBee.Device.DoorLock doorLock, List<MemberInfoRes> localAccountList)
         {
             this.doorLock = doorLock;
             this.localAccountList = localAccountList;
@@ -33,7 +33,7 @@
         /// <summary>
         /// 鏈湴璐︽埛鍒楄〃
         /// </summary>
-        List<Shared.Phone.UserCenter.MemberInfoRes> localAccountList;
+        List<MemberInfoRes> localAccountList;
         /// <summary>
         /// 婊戝姩甯冨眬View
         /// </summary>
@@ -79,8 +79,8 @@
             });
         }
 
-        /// <summary>
-        /// UI鏄剧ず
+        /// <summary>
+        /// UI鏄剧ず
         /// </summary>
         public void Show()
         {
@@ -488,25 +488,19 @@
                     btnLine.Visible = false;
                 }
 
-                if (!string.IsNullOrEmpty(currentAccount.UserName))
-                {
-                    btnUserName.Text = currentAccount.UserName;
-                }
-                else
-                {
-                    btnUserName.Text = currentAccount.Account;
-                }
+                btnUserName.Text = currentAccount.ShowName;
 
                 EventHandler<MouseEventArgs> eHandler = (sender, e) =>
                 {
-                    if (doorLock.IsFreezeAccount[currentAccount.SubAccountDistributedMark] == true)
-                    {
-                        Application.RunOnMainThread(() =>
-                        {
-                            new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
-                        });
-                        return;
-                    }
+                    //鈽嗐優銉笺偗鈽�
+                    //if (doorLock.IsFreezeAccount[currentAccount.SubAccountDistributedMark] == true)
+                    //{
+                    //    Application.RunOnMainThread(() =>
+                    //    {
+                    //        new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
+                    //    });
+                    //    return;
+                    //}
 
                     if (!btnChoose.IsSelected)
                     {
@@ -526,7 +520,8 @@
                         oldbuttonChoose.IsSelected = true;
                         oldbuttonChoose.Visible = true;
                         oldUserName.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                        curAccountId = currentAccount.SubAccountDistributedMark;
+                        //鈽嗐優銉笺偗鈽�
+                        //curAccountId = currentAccount.SubAccountDistributedMark;
                     }
                 };
                 btnChoose.MouseUpEventHandler += eHandler;
@@ -563,9 +558,10 @@
                        else
                        {
                            var addLockInfo = new ZigBee.Device.DoorLock.AddDoorLockData();
-                           if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+                           if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
                            {
-                               addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
+                               //鈽嗐優銉笺偗鈽�
+                               //addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                                addLockInfo.IsOtherAccountCtrl = true;
                            }
                            addLockInfo.CloudAccountId = curAccountId;
@@ -612,7 +608,7 @@
                            var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/AddDoorLock", addLockInfo);
                            if (result != null)
                            {
-                               if (result.StateCode == "Success")
+                               if (result.Code == HttpMessageEnum.A鎴愬姛)
                                {
                                    //瀛橀棬閿佷俊鎭�
                                    var resultList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalDoorLocklist(doorLock, curAccountId);

--
Gitblit v1.8.0