From f96d6e7fb045f2be98300ada72c1c76f726005eb Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 16 十二月 2020 15:33:02 +0800
Subject: [PATCH] 2020-12-16 1.面容指纹解锁开关,通过数字验证问题修复。

---
 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs |   86 ++++++++++++++++++++++++------------------
 1 files changed, 49 insertions(+), 37 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
index 496648d..a212c2b 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
@@ -327,11 +327,33 @@
             //4:闈㈠ID
             string faceIDUnlockType = "4";
 
+            //鎴愬姛浜嬩欢
+            Action successAction = () =>
+            {
+                var result = btnFaceIdUnlockSwtichIcon.IsSelected = !btnFaceIdUnlockSwtichIcon.IsSelected;
+                if (result)
+                {
+                    if (!UserInfo.Current.appUnlockType.Contains(faceIDUnlockType))
+                    {
+                        UserInfo.Current.appUnlockType.Add(faceIDUnlockType);
+                        UserInfo.Current.SaveUserInfo();
+                    }
+                }
+                else
+                {
+                    if (UserInfo.Current.appUnlockType.Contains(faceIDUnlockType))
+                    {
+                        UserInfo.Current.appUnlockType.Remove(faceIDUnlockType);
+                        UserInfo.Current.SaveUserInfo();
+                    }
+                }
+            };
+
             Action fingerAction = () =>
             {
                 TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.VerifyFaceID));
             };
-            new AppUnlockPage().LoadFaceIDGesturePage(optionType, fingerAction);
+            new AppUnlockPage().LoadFaceIDGesturePage(optionType, fingerAction, successAction);
 
             TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.VerifyFaceID));
 
@@ -339,24 +361,7 @@
             {
                 if (e == TouchIDUtils.TouchIDState.Success)
                 {
-                    var result = btnFaceIdUnlockSwtichIcon.IsSelected = !btnFaceIdUnlockSwtichIcon.IsSelected;
-                    if (result)
-                    {
-                        if (!UserInfo.Current.appUnlockType.Contains(faceIDUnlockType))
-                        {
-                            UserInfo.Current.appUnlockType.Add(faceIDUnlockType);
-                            UserInfo.Current.SaveUserInfo();
-                        }
-                    }
-                    else
-                    {
-                        if (UserInfo.Current.appUnlockType.Contains(faceIDUnlockType))
-                        {
-                            UserInfo.Current.appUnlockType.Remove(faceIDUnlockType);
-                            UserInfo.Current.SaveUserInfo();
-                        }
-                    }
-                    //MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1);
+                    successAction?.Invoke();
                     MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                 }
                 else// if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout)
@@ -410,12 +415,34 @@
         {
             //5:鎸囩汗ID寮�鍏�
             string optionType = "5";
+            //鎴愬姛浜嬩欢
+            Action successAction = () =>
+            {
+                var result = btnFingerprintUnlockSwtichIcon.IsSelected = !btnFingerprintUnlockSwtichIcon.IsSelected;
+                if (result)
+                {
+                    if (!UserInfo.Current.appUnlockType.Contains("3"))
+                    {
+                        UserInfo.Current.appUnlockType.Add("3");
+                        UserInfo.Current.SaveUserInfo();
+                    }
+                }
+                else
+                {
+                    if (UserInfo.Current.appUnlockType.Contains("3"))
+                    {
+                        UserInfo.Current.appUnlockType.Remove("3");
+                        UserInfo.Current.SaveUserInfo();
+                    }
+                }
+            };
+
 
             Action fingerAction = () =>
             {
                 TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint));
             };
-            new AppUnlockPage().LoadGesturePage(optionType, fingerAction);
+            new AppUnlockPage().LoadGesturePage(optionType, fingerAction, successAction);
 
             TouchIDUtils.Instance.showTouchIDWithDescribe(null, Language.StringByID(StringId.PleaseVerifyTheFingerprint));
 
@@ -423,23 +450,8 @@
             {
                 if (e == TouchIDUtils.TouchIDState.Success)
                 {
-                    var result = btnFingerprintUnlockSwtichIcon.IsSelected = !btnFingerprintUnlockSwtichIcon.IsSelected;
-                    if (result)
-                    {
-                        if (!UserInfo.Current.appUnlockType.Contains("3"))
-                        {
-                            UserInfo.Current.appUnlockType.Add("3");
-                            UserInfo.Current.SaveUserInfo();
-                        }
-                    }
-                    else
-                    {
-                        if (UserInfo.Current.appUnlockType.Contains("3"))
-                        {
-                            UserInfo.Current.appUnlockType.Remove("3");
-                            UserInfo.Current.SaveUserInfo();
-                        }
-                    }
+                    successAction?.Invoke();
+
                     MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                 }
                 else// if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout)

--
Gitblit v1.8.0