From f60ce72c3c29c7d31a046795c88ec39a69e73d45 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 06 一月 2021 17:33:54 +0800 Subject: [PATCH] 2021-01-06 1.替换新云端前期准备相关接口,和修改相关参数。 --- Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs index b93a02f..b3fff6e 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs @@ -251,6 +251,11 @@ if (etPasswrod.Text == "" && etConfirmPassword.Text == "") { new Alert ("", Language.StringByID (R.MyInternationalizationString.PleaseWriteTheCompleteContent), Language.StringByID (R.MyInternationalizationString.Close)).Show (); return; + } else if (passwordText.Contains(userName)) { + //瀵嗙爜涓嶈兘鍖呭惈鐢ㄦ埛鍚� + new Alert ("", ErrorCode.PasswordNotUsername, + Language.StringByID (R.MyInternationalizationString.Close)).Show (); + return; } else if (!CommonUtlis.Current.CheckPassword(etPasswrod.Text.Trim ())) { new Alert ("", ErrorCode.PasswordStrengthNotMatch, Language.StringByID (R.MyInternationalizationString.Close)).Show (); @@ -283,7 +288,7 @@ var requestObj = new YdRegisterAccountObj () { Account = account, Password = passwordText, Contact = userName, Language = Language.CurrentLanguage, Company = MainPage.SoftSmsType }; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj); var revertObj = MainPage.RequestHttps (API.YdRegisterAccount, requestJson); - if (revertObj.StateCode.ToUpper() == "SUCCESS") { + if (revertObj.StateCode.ToUpper() == StateCode.SUCCESS) { Application.RunOnMainThread (() => { new Alert ("", Language.StringByID (R.MyInternationalizationString.AuthenticationMail), Language.StringByID (R.MyInternationalizationString.Close)).Show (); Close (); -- Gitblit v1.8.0