DLL/Shared.Droid.HDLWidget.dllBinary files differ
DLL/Shared.Droid.dllBinary files differ
DLL/Shared.Droid.xml
@@ -2681,6 +2681,17 @@ 设置PickerView 选中文字的颜色 </summary> </member> <member name="P:Shared.UIPickerView.TextSize"> <summary> 文字大小 </summary> <value>The size of the text.</value> </member> <member name="P:Shared.UIPickerView.PickerBackgroundColor"> <summary> 背景颜色 </summary> </member> <member name="F:Shared.UIPickerView.mOnSelectChangeListener"> <summary> OnProgressChangeListener 继承响应事件 DLL/Shared.IOS.TBL.dllBinary files differ
DLL/Shared.IOS.dllBinary files differ
DLL/Shared.IOS.xml
@@ -129,6 +129,11 @@ UI处理类 </summary> </member> <member name="F:Shared.Application.IsEditTextContentTypePassword"> <summary> EditText是否默认密码输入方式 </summary> </member> <member name="P:Shared.Application.IsFullScreen"> <summary> 2020-06-23 @@ -276,6 +281,12 @@ <summary> 关闭定位服务 </summary> </member> <member name="M:Shared.Application.SetStatusBarTextBlack(System.Boolean)"> <summary> 设置顶部状态栏字体颜色 </summary> <param name="isBlack">是否设置黑色</param> </member> <member name="T:Shared.Button"> <summary> @@ -2971,6 +2982,17 @@ 设置PickerView 选中文字的颜色 </summary> </member> <member name="P:Shared.UIPickerView.TextSize"> <summary> 文字大小 </summary> <value>The size of the text.</value> </member> <member name="P:Shared.UIPickerView.PickerBackgroundColor"> <summary> 背景颜色 </summary> </member> <member name="F:Shared.UIPickerView.OnSelectChangeEvent"> <summary> Action @@ -3240,16 +3262,6 @@ 当前进度值 </summary> <value>进度值</value> </member> <member name="P:Shared.CurtainRollSeekBar.CurtainPaddingLeftRight"> <summary> 进度条与左右边框边距 </summary> </member> <member name="P:Shared.CurtainRollSeekBar.CurtainPaddingTop"> <summary> 顶部padding </summary> </member> <member name="P:Shared.CurtainRollSeekBar.IsOffline"> <summary> @@ -4285,6 +4297,11 @@ </summary> <value>X坐标</value> </member> <member name="P:Shared.DiyImageSeekBar.IsInvertedProgress"> <summary> 进度值是否取反 </summary> </member> <member name="F:Shared.DiyImageSeekBar.OnProgressChangedEvent"> <summary> EventHandler @@ -4721,6 +4738,11 @@ 设置是否为百叶窗样式 </summary> </member> <member name="P:Shared.CurtainRollSeekBarOn.IsInvertedProgress"> <summary> 进度值是否取反 </summary> </member> <member name="F:Shared.CurtainRollSeekBarOn.OnProgressChangedEvent"> <summary> EventHandler @@ -4828,6 +4850,11 @@ </summary> <value>X坐标</value> </member> <member name="P:Shared.CurtainSeekBarOn.IsInvertedProgress"> <summary> 进度值是否取反 </summary> </member> <member name="F:Shared.CurtainSeekBarOn.OnProgressChangedEvent"> <summary> EventHandler HDL-ON_iOS/AppDelegate.cs
@@ -211,6 +211,7 @@ { //Shared.Application.FontSize = 12; Shared.Application.IsEditTextContentTypePassword = false; Shared.Application.IsUsePingFang = true; Window = new UIWindow(UIScreen.MainScreen.Bounds); rootViewController = new UINavigationController(new ViewController()) { NavigationBarHidden = true }; HDL_ON/Common/Constant.cs
@@ -235,6 +235,25 @@ Prompt, } /// <summary> /// BottomLine 类型 /// </summary> public enum BottomLineType { /// <summary> /// 普通 /// </summary> Normal = 0, /// <summary> /// 获取焦点 /// </summary> GotFocus, /// <summary> /// 错误 /// </summary> Error, } #endregion } HDL_ON/Common/HDLCommon.cs
@@ -69,7 +69,7 @@ #endregion #region 检测更新 #region ■ 检测更新_______________________ /// <summary> /// 检测更新线程 /// </summary> @@ -238,7 +238,7 @@ } } #region 推送处理 #region ■ 推送处理_______________________ /// <summary> /// 推送消息处理 /// </summary> @@ -337,5 +337,35 @@ #endregion #region ■ 常用方法_______________________ /// <summary> /// 设置下划线按钮状态 /// 统一封装设置方法 /// </summary> /// <param name="button">下划线按钮</param> /// <param name="bottomLineType">状态</param> public void BottomLineShowType(Button button, BottomLineType bottomLineType) { switch (bottomLineType) { case BottomLineType.GotFocus: button.BackgroundColor = CSS_Color.MainColor; button.Height = Application.GetRealHeight(2); break; case BottomLineType.Error: button.BackgroundColor = CSS_Color.AuxiliaryColor2; button.Height = Application.GetRealHeight(2); break; case BottomLineType.Normal: button.BackgroundColor = CSS_Color.DividingLineColor; button.Height = Application.GetRealHeight(1); break; default: button.BackgroundColor = CSS_Color.DividingLineColor; button.Height = Application.GetRealHeight(1); break; } } #endregion } } HDL_ON/DAL/Server/HttpUtil.cs
@@ -12,7 +12,7 @@ public class HttpUtil { #region HttpUtil 全局常量 #region **********全局常量********** ///// <summary> ///// API_HTTPS ///// </summary> @@ -36,6 +36,7 @@ #endregion #region **********网络请求封装********** /// <summary> /// 固定域名,正式环境 /// </summary> @@ -145,7 +146,7 @@ /// <param name="replaceToken"></param> /// <param name="mTimeout"></param> /// <returns></returns> public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10) static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10) { #region HttpWebRequest try @@ -167,7 +168,6 @@ RestRequest request = new RestRequest(method); request.Timeout = mTimeout * 1000; request.AddHeader("content-type", "application/json"); //request.AddHeader ("cache-control", "no-cache"); if (string.IsNullOrEmpty(replaceToken)) { @@ -207,7 +207,6 @@ { try { ResponsePackNew revertObj = new ResponsePackNew() { }; revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePackNew>(response.Content); //*****一些判空处理***************** @@ -222,8 +221,6 @@ } //*****一些判空处理***************** ////统一转成大写 //revertObj.StateCode = revertObj.StateCode.ToUpper (); return revertObj; } catch (Exception ex) @@ -247,6 +244,69 @@ #endregion } /// <summary> /// 通用 请求服务器方法 /// 增加token过期处理 /// </summary> /// <param name="method"></param> /// <param name="apiPath"></param> /// <param name="bodyParameterJson"></param> /// <param name="queryDictionary"></param> /// <param name="urlSegmentDictionary"></param> /// <param name="urlHead"></param> /// <param name="replaceToken"></param> /// <param name="mTimeout"></param> /// <returns></returns> public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10) { var responsePackNew = RequestHttpsBase(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout); //*****************Token过期处理***************** if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) { //刷新Token if (RefreshToken()) { return RequestHttpsBase(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout); } else { return responsePackNew; } } //*****************Token过期处理***************** return responsePackNew; } /// <summary> /// 刷新Token /// </summary> /// <returns></returns> static bool RefreshToken() { try { var requestJson = GetSignRequestJson(new RefreshTokenObj() { refreshToken = UserInfo.Current.RefreshToken, }); var revertObj = RequestHttpsBase(Method.POST, NewAPI.API_POST_Login, requestJson); if (revertObj.Code == StateCode.SUCCESS) { var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(revertObj.Data.ToString()); UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken; UserInfo.Current.RefreshToken = revertData.refreshToken; UserInfo.Current.LastTime = DateTime.Now; UserInfo.Current.SaveUserInfo(); return true; } return false; } catch { return false; } } /// <summary> @@ -275,7 +335,6 @@ ////**************测试************** RestClient client = new RestClient(requestFullUrl); //client.Timeout = mTimeout * 1000; RestRequest request = new RestRequest(Method.POST); request.Timeout = mTimeout * 1000; request.AddHeader("content-type", "application/json"); @@ -454,7 +513,9 @@ } #endregion #region **********签名校验********** /// <summary> /// /// </summary> @@ -552,6 +613,7 @@ } } #endregion } /// <summary> @@ -587,7 +649,5 @@ } } HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs
@@ -165,6 +165,10 @@ /// </summary> string registerPhone; string registerEmail; /// <summary> /// 是否点击了返回,用于屏蔽EditText失去焦点检测事件 /// </summary> bool isHitBack; #endregion /// <summary> @@ -185,7 +189,11 @@ public void ShowDialog() { new TopViewDiv(this, bodyView, Language.StringByID(StringId.ForgetPassword)).LoadTopView(); Action backAction = () => { isHitBack = true; }; new TopViewDiv(this, bodyView, Language.StringByID(StringId.ForgetPassword)).LoadTopView(backAction); //new PublicAssmebly().LoadTopView(this, bodyView, Language.StringByID(StringId.ForgetPassword)); #region 修改方式选择 HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
@@ -32,6 +32,12 @@ { if (registerType == 0) return; if (!string.IsNullOrEmpty(etAccount.Text.Trim())) { //记录之前的邮箱 registerEmail = etAccount.Text.Trim(); } etAccount.IsNumberKeyboardType = true; etAccount.Text = registerPhone; etPassword.Text = ""; @@ -61,7 +67,14 @@ { if (registerType == 1) return; if (!string.IsNullOrEmpty(etAccount.Text.Trim())) { //记录之前的手机号 registerPhone = etAccount.Text.Trim(); } etAccount.IsNumberKeyboardType = false; etAccount.SecureTextEntry = false;//2020-12-10 解决Android数字切换回路普通键盘变加密问题 etAccount.Text = registerEmail; etPassword.Text = ""; etRepeatPassword.Text = ""; @@ -120,7 +133,26 @@ btnGetVerificationCode_Mail.IsSelected = true; } } LoadMothed_EnableResetButton(); }; //etVerificationCode.TextChangeEventHandler = (sender, e) => { // if (etVerificationCode.Text.Length > 1) // { // LoadMothed_EnableResetButton(); // } //}; Action<View, string> textChangeEventHandler = (view, textStr) => { LoadMothed_EnableResetButton(); }; //etAccount.TextChangeEventHandler += textChangeEventHandler; etPassword.TextChangeEventHandler += textChangeEventHandler; etRepeatPassword.TextChangeEventHandler += textChangeEventHandler; etVerificationCode.TextChangeEventHandler += textChangeEventHandler; } /// <summary> @@ -133,22 +165,22 @@ { if (etAccount.Foucs) { btnAccountViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnAccountViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.GotFocus); } else { //标记手机号码无效 btnAccountViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnAccountViewBottomLine.Height = Application.GetRealHeight(1); if (isHitBack) return;//点击返回关闭页面不检测提示 HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Normal); if (etAccount.Text.Length == 0) return;//没输入不检测提示 //手机方式-验证手机号码是否正确 if (registerType == 0) { btnGetVerificationCode_Phone.IsSelected = false; if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode)) { btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnAccountViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error); new Tip() { CloseTime = 1, @@ -158,7 +190,7 @@ } else { if (btnGetVerificationCode_Phone.Text == Language.StringByID( StringId.GetVerificationCode)) if (btnGetVerificationCode_Phone.Text == Language.StringByID(StringId.GetVerificationCode)) { btnGetVerificationCode_Phone.IsSelected = true; } @@ -171,8 +203,7 @@ //邮箱方式-验证邮箱是否正确 if (!Utlis.CheckEmail(etAccount.Text.Trim())) { btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnAccountViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error); new Tip() { CloseTime = 1, @@ -197,16 +228,19 @@ { if (etPassword.Foucs) { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.GotFocus); } else { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnPasswordViewBottomLine.Height = Application.GetRealHeight(1); if (isHitBack) return;//点击返回关闭页面不检测提示 HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Normal); if (etPassword.Text.Length == 0) return;//没输入不检测提示 //校验密码是否符合要求 if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13) { HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Error); new Tip() { CloseTime = 1, @@ -222,18 +256,17 @@ { if (etRepeatPassword.Foucs) { btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.GotFocus); } else { btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(1); if (isHitBack) return;//点击返回关闭页面不检测提示 HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Normal); //校验两次输入的密码是否一致 if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim()) { btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Error); new Tip() { CloseTime = 1, @@ -253,13 +286,13 @@ { if (etVerificationCode.Foucs) { btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.GotFocus); } else { btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(1); if (isHitBack) return;//点击返回关闭页面不检测提示 HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Normal); if (etVerificationCode.Text.Length > 4) { LoadMothed_EnableResetButton(); @@ -292,7 +325,8 @@ /// 检测当前配置域名是否一致,不一致则替换 /// </summary> /// <param name="result"></param> void CheckAndSetUserRequestHost(ResponsePackNew result) { void CheckAndSetUserRequestHost(ResponsePackNew result) { try { var mGlobalRegionListObj = Newtonsoft.Json.JsonConvert.DeserializeObject<GlobalRegionListRes>(result.Data.ToString()); @@ -361,8 +395,8 @@ //3.发送验证码成功,开始计时 Application.RunOnMainThread(() => { //短信发送间隔60s (sender as Button).IsSelected = false; //短信发送间隔60s (sender as Button).IsSelected = false; etVerificationCode.Foucs = true; }); //2.1获取验证码倒计时 @@ -379,8 +413,8 @@ } Application.RunOnMainThread(() => { //回复获取短信按钮事件 (sender as Button).IsSelected = true; //回复获取短信按钮事件 (sender as Button).IsSelected = true; (sender as Button).TextID = StringId.GetVerificationCode; }); }) @@ -419,6 +453,13 @@ { if (btnReset.IsSelected) { //检测账号 if (!CheckAccount()) return; //检测密码 if (!CheckPassword()) return; //检测验证码 if (!CheckVerificationCode()) return; //创建修改密码线程 var loginThread = LoadMothed_ResetThread(); waitPage = new Loading(); @@ -472,8 +513,7 @@ // 验证码错误 警告提示 if (resultObj.Code == StateCode.VERIFICATION_CODE_WRONG) { btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Error); } }); // 提示错误 @@ -498,6 +538,76 @@ } /// <summary> /// 检测账号 /// </summary> /// <returns></returns> bool CheckAccount() { //手机方式-验证手机号码是否正确 if (registerType == 0) { if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode)) { Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectMobilNeumber)); } else { return true; } } else if (registerType == 1) { //邮箱方式-验证邮箱是否正确 if (!Utlis.CheckEmail(etAccount.Text.Trim())) { Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectEmailAddress)); } else { return true; } } return false; } /// <summary> /// 检测密码是否正确 /// </summary> /// <returns></returns> bool CheckPassword() { //校验密码是否符合要求 if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13) { Utlis.ShowTip(Language.StringByID(StringId.PasswordIsUnqualified)); return false; } if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim()) { Utlis.ShowTip(Language.StringByID(StringId.IncorrectRepeatPassword)); return false; } return true; } /// <summary> /// 检测验证码是否输入 /// </summary> /// <returns></returns> bool CheckVerificationCode() { if (string.IsNullOrEmpty(etVerificationCode.Text)) { Utlis.ShowTip(Language.StringByID(StringId.PlsEntryVerificationCode)); return false; } return true; } /// <summary> /// 显示自动自动登录事件 /// </summary> void ShowAutoLoginDialog(string account, string password, bool isPhone) @@ -514,7 +624,7 @@ FrameLayout contentView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealWidth(200), Y = Application.GetRealWidth(200), Width = Application.GetRealWidth(288), Height = Application.GetRealWidth(270), Radius = (uint)Application.GetRealWidth(6), HDL_ON/UI/UI1-Login/RegisterPage.cs
@@ -166,12 +166,12 @@ #endregion #region 局部变量列表 /// <summary> /// 账号类型 /// 0:手机 /// 1:邮箱 /// </summary> int accountType = 0; ///// <summary> ///// 账号类型 ///// 0:手机 ///// 1:邮箱 ///// </summary> //int accountType = 0; /// <summary> /// 手机号码是否有效 /// </summary> @@ -193,7 +193,7 @@ /// 0:手机 /// 1:邮箱 /// </summary> int registerType; int registerType = 0; /// <summary> /// 手机区号 /// </summary> @@ -205,6 +205,10 @@ string registerPhone; string registerEmail; /// <summary> /// 是否点击了返回,用于屏蔽EditText失去焦点检测事件 /// </summary> bool isHitBack; #endregion /// <summary> @@ -244,7 +248,12 @@ public void ShowDialog() { new TopViewDiv(this, bodyView, Language.StringByID(StringId.Register)).LoadTopView(); Action backAction = () => { isHitBack = true; }; new TopViewDiv(this, bodyView, Language.StringByID(StringId.Register)).LoadTopView(backAction); //new PublicAssmebly().LoadTopView(this, bodyView, Language.StringByID(StringId.Register)); #region 注册方式选择 @@ -362,7 +371,7 @@ }; btnGlobalRoaming.MouseUpEventHandler += eHandler; if (accountType == 0) if (registerType == 0) { accountView.AddChidren(btnGlobalRoaming); } @@ -406,7 +415,7 @@ Height = Application.GetMinRealAverage(20), UnSelectedImagePath = "LoginIcon/AccountIcon.png", }; if (accountType == 1) if (registerType == 1) { accountView.AddChidren(btnAccountIcon); } HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
@@ -24,6 +24,27 @@ LoadEvent_Server(); //var areaCodeList = pm.GetAreaCode(); } /// <summary> /// 使能修改注册按钮 /// 有内容才显示注册按钮 /// </summary> void CheckEnableRegisterButton() { if (!string.IsNullOrEmpty(etAccount.Text) && !string.IsNullOrEmpty(etPassword.Text) && !string.IsNullOrEmpty(etVerificationCode.Text) && (etPassword.Text.Trim() == etRepeatPassword.Text.Trim())) { btnRegister.IsSelected = true; } else { btnRegister.IsSelected = false; } //Utlis.WriteLine(" btnRegister.IsSelected:" + btnRegister.IsSelected.ToString()); } /// <summary> /// 加载文本变化事件 /// </summary> @@ -57,7 +78,12 @@ btnGetVerificationCode_Mail.IsSelected = true; } } CheckEnableRegisterButton(); }; etVerificationCode.TextChangeEventHandler = (sender, e) => { CheckEnableRegisterButton(); }; } @@ -73,6 +99,13 @@ { return; } if (!string.IsNullOrEmpty(etAccount.Text.Trim())) { //记录之前的邮箱 registerEmail = etAccount.Text.Trim(); } etAccount.IsNumberKeyboardType = true; etAccount.Text = registerPhone; etPassword.Text = ""; @@ -103,7 +136,13 @@ if (registerType == 1) return; if (!string.IsNullOrEmpty(etAccount.Text.Trim())) { //记录之前的手机号 registerPhone = etAccount.Text.Trim(); } etAccount.IsNumberKeyboardType = false; etAccount.SecureTextEntry = false;//2020-12-10 解决Android数字切换回路普通键盘变加密问题 etAccount.Text = registerEmail; etPassword.Text = ""; etRepeatPassword.Text = ""; @@ -139,14 +178,14 @@ { if (etAccount.Foucs) { btnAccountViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnAccountViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.GotFocus); } else { if (isHitBack) return;//点击返回关闭页面不检测提示 //标记手机号码无效 btnAccountViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnAccountViewBottomLine.Height = Application.GetRealHeight(1); HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Normal); //手机注册-验证手机号码是否正确 if (etAccount.Text.Trim().Length > 0) { @@ -154,8 +193,7 @@ { if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode)) { btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnAccountViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error); btnGetVerificationCode_Phone.IsSelected = false; new Tip() { @@ -183,8 +221,7 @@ //邮箱注册-验证邮箱是否正确 if (!Utlis.CheckEmail(etAccount.Text.Trim())) { btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnAccountViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error); btnGetVerificationCode_Mail.IsSelected = false; new Tip() { @@ -207,14 +244,7 @@ } } } if (accountType == 0) { registerPhone = etAccount.Text.Trim(); } else { registerEmail = etAccount.Text.Trim(); } } }; @@ -223,23 +253,19 @@ { if (etPassword.Foucs) { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.GotFocus); } else { if (etPassword.Text.Length == 0) { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnPasswordViewBottomLine.Height = Application.GetRealHeight(1); return; } if (isHitBack) return;//点击返回关闭页面不检测提示 HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Normal); if (etPassword.Text.Length == 0) return;//没输入不检测提示 //需要输入6位以上的密码 if (etPassword.Text.Length < 6 || etPassword.Text.Length > 13) { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Error); new Tip() { CloseTime = 1, @@ -247,11 +273,7 @@ Text = Language.StringByID(StringId.PlsRegisterPassword) }.Show(bodyView); } else { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnPasswordViewBottomLine.Height = Application.GetRealHeight(1); } } }; @@ -260,20 +282,19 @@ { if (etRepeatPassword.Foucs) { btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.GotFocus); } else { btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(1); if (isHitBack) return;//点击返回关闭页面不检测提示 HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Normal); //校验两次输入的密码是否一致 if (etPassword.Text.Trim().Length > 5) { if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim()) { btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Error); new Tip() { CloseTime = 1, @@ -299,13 +320,13 @@ { if (etVerificationCode.Foucs) { btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.GotFocus); } else { btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(1); if (isHitBack) return;//点击返回关闭页面不检测提示 HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Normal); if (etVerificationCode.Text.Length > 1) { //账号有效、密码有效、验证码输入了,才能点击注册 @@ -316,6 +337,7 @@ } } }; } /// <summary> @@ -329,6 +351,7 @@ { etPassword.Text = etPassword.Text.Remove(15); } CheckEnableRegisterButton(); }; etRepeatPassword.TextChangeEventHandler = (sender, e) => @@ -337,6 +360,7 @@ { etRepeatPassword.Text = etRepeatPassword.Text.Remove(15); } CheckEnableRegisterButton(); }; } @@ -519,20 +543,16 @@ { btnRegister.MouseUpEventHandler = (sender, e) => { if (etPassword.Text.Trim().Length > 13 || etPassword.Text.Trim().Length < 6) { new Tip() { CloseTime = 1, Direction = AMPopTipDirection.None, Text = Language.StringByID(StringId.PlsRegisterPassword) }.Show(bodyView); return; } if (btnRegister.IsSelected) { //判断是否选择了服务器,选择了才能发送验证码 if (CheckIfSelectServer() == false) return; //检测账号 if (!CheckAccount()) return; //检测密码 if (!CheckPassword()) return; //检测验证码 if (!CheckVerificationCode()) return; waitPage = new Loading(); new PublicAssmebly().LoadPage_WaitPage(LoadMethod_RegisterThread(), bodyView, waitPage); @@ -572,40 +592,13 @@ // 提示错误 IMessageCommon.Current.ShowErrorInfoAlter(validateSmsResult.Code); //2020-11-13 待修改 //string erorrInfo = ""; //switch (validateSmsResult.StateCode) //{ // case "Exist": // erorrInfo = Language.StringByID(StringId.AccountAlreadyUse); // break; // case "PwdNoConfirm": // erorrInfo = Language.StringByID(StringId.IncorrectRepeatPassword); // break; // case "ValidCodeAndPhoneNoEqual": // erorrInfo = Language.StringByID(StringId.VerificationCodeWrong); // break; // case "NoRecord": // erorrInfo = Language.StringByID(StringId.PlsGetTheVerificationCode); // Application.RunOnMainThread(() => // { // btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; // btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2); // }); // break; // default: // erorrInfo = Language.StringByID(StringId.RegistrationFailedPleaseTryAgain); // break; //} //Application.RunOnMainThread(() => //{ // new Tip() // { // CloseTime = 1, // Direction = AMPopTipDirection.None, // Text = erorrInfo, // }.Show(bodyView); //}); Application.RunOnMainThread(() => { if (validateSmsResult.Code == StateCode.VERIFICATION_CODE_WRONG) { HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Error); } }); } } catch (Exception ex) @@ -673,13 +666,11 @@ { if (isError) { btnServerBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; btnServerBottomLine.Height = Application.GetRealHeight(2); HDLCommon.Current.BottomLineShowType(btnServerBottomLine, BottomLineType.Error); } else { btnServerBottomLine.BackgroundColor = CSS_Color.DividingLineColor; btnServerBottomLine.Height = Application.GetRealHeight(1); HDLCommon.Current.BottomLineShowType(btnServerBottomLine, BottomLineType.Normal); } } @@ -694,5 +685,76 @@ btnServerText.TextColor = CSS_Color.FirstLevelTitleColor; btnServerText.Text = UserInfo.Current.GlobalRegion.regionName; } /// <summary> /// 检测账号 /// </summary> /// <returns></returns> bool CheckAccount() { //手机方式-验证手机号码是否正确 if (registerType == 0) { if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode)) { Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectMobilNeumber)); } else { return true; } } else if (registerType == 1) { //邮箱方式-验证邮箱是否正确 if (!Utlis.CheckEmail(etAccount.Text.Trim())) { Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectEmailAddress)); } else { return true; } } return false; } /// <summary> /// 检测密码是否正确 /// </summary> /// <returns></returns> bool CheckPassword() { //校验密码是否符合要求 if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13) { Utlis.ShowTip(Language.StringByID(StringId.PasswordIsUnqualified)); return false; } if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim()) { Utlis.ShowTip(Language.StringByID(StringId.IncorrectRepeatPassword)); return false; } return true; } /// <summary> /// 检测验证码是否输入 /// </summary> /// <returns></returns> bool CheckVerificationCode() { if (string.IsNullOrEmpty(etVerificationCode.Text)) { Utlis.ShowTip(Language.StringByID(StringId.PlsEntryVerificationCode)); return false; } return true; } } } HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -300,7 +300,7 @@ }; rowView.AddChidren(btnDatetime); var lineView = new LineView(rowView.Height); var lineView = new LineView(rowView.Height - Application.GetRealHeight(1)); rowView.AddChidren(lineView); //删除按钮 @@ -319,12 +319,13 @@ btnDatetime.Text = GetUnixToDateTime(pushMessageInfo.createTime); //EventHandler<MouseEventArgs> eventHandler = (sender, e) => //{ //}; //btnTilte.MouseUpEventHandler = eventHandler; //btnSubtitle.MouseUpEventHandler = eventHandler; EventHandler<MouseEventArgs> eventHandler = (sender, e) => { new Alert(pushMessageInfo.messageTitle, pushMessageInfo.messageContent, Language.StringByID(StringId.Close)).Show(); }; rowView.MouseUpEventHandler = eventHandler; btnTilte.MouseUpEventHandler = eventHandler; btnSubtitle.MouseUpEventHandler = eventHandler; } /// <summary> HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
@@ -40,6 +40,12 @@ /// /// </summary> FrameLayout bodyView; /// <summary> /// 是否点击了返回,用于屏蔽EditText失去焦点检测事件 /// </summary> bool isHitBack; #endregion public ResetPasswordPage() @@ -50,7 +56,13 @@ public void LoadPage() { bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView(); Action backAction = () => { isHitBack = true; }; new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView(backAction); #region 新密码 FrameLayout rowView = new FrameLayout() @@ -257,6 +269,10 @@ } else { if (isHitBack) return;//点击返回关闭页面不检测提示 if (etPassword.Text.Length == 0) return;//没输入不检测提示 //校验密码是否符合要求 if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13) { @@ -283,6 +299,10 @@ } else { if (isHitBack) return;//点击返回关闭页面不检测提示 if (etRepeatPassword.Text.Length == 0) return;//没输入不检测提示 //校验两次输入的密码是否一致 if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim()) { @@ -300,6 +320,13 @@ } }; Action<View, string> textChangeEventHandler = (view, textStr) => { LoadMothed_EnableResetButton(); }; etPassword.TextChangeEventHandler += textChangeEventHandler; etRepeatPassword.TextChangeEventHandler += textChangeEventHandler; } /// <summary>