From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs
index 86513a8..ffeae6e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoercePswAddContactForm.cs
@@ -42,6 +42,21 @@
             btnIcon.InitControl();
             btnIcon.ButtonClickEvent += ((sender, e) =>
             {
+                Contacts.ContactAction = (phoneName, phoneNum) =>
+                {
+                    if (string.IsNullOrEmpty(phoneName) == true)
+                    {
+                        return;
+                    }
+                    //鎵嬫満鍙锋娴�
+                    if (this.CheckPhoneNumber("86", phoneNum, phoneName) == false)
+                    {
+                        return;
+                    }
+                    //淇濆瓨鑱旂郴浜�
+                    this.SaveCoercePhoneNumber("86", phoneNum, phoneName);
+                };
+                Contacts.Open();
             });
 
             //鍒濆鍖栦腑閮ㄤ俊鎭�
@@ -101,6 +116,8 @@
             btnLine.Y = Application.GetRealHeight(150);
             btnLine.Gravity = Gravity.CenterHorizontal;
             frameBack.AddChidren(btnLine);
+            //鑱斿姩绾跨殑鐘舵��
+            txtPhone.btnLine = btnLine;
 
             //澶囨敞
             var txtNote = new TextInputControl(Application.GetRealWidth(740), txtPhone.Height, false);
@@ -153,13 +170,16 @@
         /// </summary>
         /// <param name="areaCode"></param>
         /// <param name="phoneNum"></param>
+        /// <param name="strNote"></param>
         private async void SaveCoercePhoneNumber(string areaCode, string phoneNum, string strNote)
         {
-            Dictionary<string, string> dicPhone = new Dictionary<string, string>();
-            dicPhone[phoneNum] = areaCode;
+            var listPhone = new List<string>();
+            listPhone.Add(areaCode + "-" + phoneNum);
+            var listNote = new List<string>();
+            listNote.Add(strNote);
 
             //鍙樻洿
-            var result = await HdlSafeguardLogic.Current.SetCoercePhoneNumber(dicPhone);
+            var result = await HdlSafeguardLogic.Current.SetCoercePhoneNumber(listPhone, listNote);
             if (result == false)
             {
                 return;

--
Gitblit v1.8.0