From 3c9ad99d4a5eeeb53f7380315197e7133f84d10c Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 27 十月 2020 14:57:33 +0800
Subject: [PATCH] 2020-10-27 1V2.510271 1.密码规则修改,修改为:密码必须为8-20个字符,包含字母、数字和符号。 2.APP本地增加登录,密码错误锁定,连续错误5次登录锁定,锁定5分钟。 3.登录界面,增加登录账号的邮箱格式匹配检测。 4.增加iOS越狱和Androidr Root检测,强制关闭APP。

---
 Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs |   46 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs b/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs
index 7ae382a..bdb616e 100644
--- a/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs
+++ b/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs
@@ -44,7 +44,10 @@
         /// 鐢ㄤ簬瀵嗙爜寮哄害姝e垯琛ㄨ揪寮�
         /// 瀵嗙爜蹇呴』涓�8-20涓瓧绗︼紝鍖呭惈瀛楁瘝銆佹暟瀛楀拰绗﹀彿
         /// </summary>
-        public static string PasswordRegexStr = "^(?![0-9]+$)(?![a-zA-Z]+$)(?![0-9a-zA-Z]+$)(?![0-9\\W]+$)(?![a-zA-Z\\W]+$)[0-9A-Za-z\\W]{8,20}$";
+        //public static string PasswordRegexStr = "^(?![0-9]+$)(?![a-zA-Z]+$)(?![0-9a-zA-Z]+$)(?![0-9\\W]+$)(?![a-zA-Z\\W]+$)[0-9A-Za-z\\W]{8,20}$";
+        public static string PasswordRegexStr = @"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,20}$";//蹇呴』鍖呭惈涓�涓ぇ鍐欙紝涓�涓皬鍐欏瓧姣嶏紝涓�涓暟瀛楋紝涓�涓壒娈婂瓧绗︼紝涓旈暱搴︿负8鍒�20浣�
+
+
 
 
         /// <summary>
@@ -142,7 +145,46 @@
 
         #endregion
 
+        /// <summary>
+        /// 妫�娴媔OS鏄惁瓒婄嫳鍜孉ndroid鏄惁root
+        /// </summary>
+        public void CheckIfJailBreak ()
+        {
 
-       
+#if __IOS__
+             var mes = "Your phone has been Jailbroken and you cannot use the APP.";
+#else
+            var mes = "Your phone has been ROOT and you cannot use the APP.";
+#endif
+
+            if (Shared.JailBreak.JailBreak.ISJailBreak ()) {
+
+                Alert alert = new Alert ("", mes, Language.StringByID (SimpleControl.R.MyInternationalizationString.Confrim));
+                alert.ResultEventHandler += (sender2, e2) => {
+                    Shared.JailBreak.JailBreak.ExitApplication ();
+                };
+                alert.Show ();
+            }
+
+
+        }
+
+        /// <summary>
+        /// 寮圭獥鎻愮ず
+        /// </summary>
+        /// <param name="mes">寮圭獥鎻愮ず淇℃伅</param>
+        /// <param name="okAction">纭鎸夐挳浜嬩欢</param>
+        public void ShowActionAlert (string mes, Action okAction)
+        {
+            Alert alert = new Alert ("", mes, Language.StringByID (SimpleControl.R.MyInternationalizationString.Cancel), Language.StringByID (SimpleControl.R.MyInternationalizationString.Confrim));
+            alert.ResultEventHandler += (sender2, e2) => {
+                if (e2) {
+                    okAction?.Invoke ();
+                }
+            };
+            alert.Show ();
+        }
+
+
     }
 }

--
Gitblit v1.8.0