From 67ed2f4a0ebe1b265a563bad3f82627ed78c3054 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 20 十一月 2020 15:48:11 +0800 Subject: [PATCH] 2020-11-20 1.修改替换正则检测方法。2.修改请求失败tip方法。3.增加隐私政策功能。 --- HDL_ON/UI/UI1-Login/LoginPageBLL.cs | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs index 24debf0..8f85501 100644 --- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs +++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs @@ -51,7 +51,7 @@ btnAccountViewBottomLine.Height = Application.GetRealHeight(2); return; } - if (!Regex.IsMatch(account, @"^[1]+\d{10}") || (account.Length != 11)) + if (!Utlis.CheckPhoneNumber(phoneNumber, phoneZoneCode)) { var tip = new Tip() { @@ -73,7 +73,7 @@ var result = pm.GetRegionByAccount(account); if (result.Code != StateCode.SUCCESS) { - IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_GetRegionByAccount, result.Code); + IMessageCommon.Current.ShowErrorInfoAlter(result.Code); return; } else @@ -113,7 +113,7 @@ btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); }); // 鎻愮ず閿欒 - IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Verification_Send, resultObj.Code); + IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); } } @@ -395,7 +395,7 @@ return; if (loginType == 0) { - if (!Regex.IsMatch(account, @"^[1]+\d{10}") || (account.Length != 11)) + if (!Utlis.CheckPhoneNumber(registerPhone, phoneZoneCode)) { var tip = new Tip() { @@ -418,7 +418,7 @@ } else { - if (!Regex.IsMatch(account, "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+")) + if (!Utlis.CheckEmail(registerEmail)) { var tip = new Tip() { @@ -493,12 +493,15 @@ { if (btnLogin.IsSelected) { + //鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛� + if (CheckPrivacyPolicy() == false) return; + account = etAccount.Text.Trim(); password = etPassword.Text.Trim(); if (loginType == 0) { - if (!Regex.IsMatch(account, @"^[1]+\d{10}") && account.Length == 11) + if (!Utlis.CheckPhoneNumber(account, phoneZoneCode)) { var tip = new Tip() { @@ -512,7 +515,7 @@ } else { - if (!Regex.IsMatch(account, "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+")) + if (!Utlis.CheckEmail(account)) { var tip = new Tip() { @@ -584,7 +587,7 @@ var result = pm.GetRegionByAccount(account); if (result.Code != StateCode.SUCCESS) { - IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_GetRegionByAccount, result.Code); + IMessageCommon.Current.ShowErrorInfoAlter(result.Code); return; } else @@ -1048,7 +1051,7 @@ else { // 鎻愮ず閿欒 - IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Gethomepager, responsePack); + IMessageCommon.Current.ShowErrorInfoAlter(responsePack); } return result; } -- Gitblit v1.8.0