| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.IsSelected = true; |
| | | btnGetVerificationCode.TextID = InternationalizationString.GetVerificationCode; |
| | | btnGetVerificationCode.TextID = StringId.GetVerificationCode; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | btnEmailLogin.TextSize = CSS_FontSize.TextFontSize; |
| | | btnPhoneLogin.TextColor = CSS_Color.MainColor; |
| | | btnPhoneLogin.TextSize = CSS_FontSize.EmphasisFontSize_Secondary; |
| | | etAccount.PlaceholderText = Language.StringByID(InternationalizationString.PlsEntryCorrectMobilNeumber); |
| | | etAccount.PlaceholderText = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber); |
| | | #endregion |
| | | |
| | | #region 切换登录方式及图标 |
| | |
| | | btnPhoneLogin.TextSize = CSS_FontSize.TextFontSize; |
| | | btnEmailLogin.TextColor = CSS_Color.MainColor; |
| | | btnEmailLogin.TextSize = CSS_FontSize.EmphasisFontSize_Secondary; |
| | | etAccount.PlaceholderText = Language.StringByID(InternationalizationString.PlsEntryEmailAddress); |
| | | etAccount.PlaceholderText = Language.StringByID(StringId.PlsEntryEmailAddress); |
| | | #endregion |
| | | |
| | | #region 切换登录类型及图标 |
| | |
| | | //邮箱只有密码登录模式 |
| | | logintMode = 0; |
| | | //密码登录 |
| | | btnSwitchLoginMode.TextID = InternationalizationString.VerificationCodeLogin; |
| | | btnSwitchLoginMode.TextID = StringId.VerificationCodeLogin; |
| | | passwordView.AddChidren(btnVisiblePassword); |
| | | passwordView.AddChidren(btnDividingLineVertical_PasswordView2); |
| | | passwordView.AddChidren(btnForgetPassword); |
| | |
| | | //密码登录 |
| | | if (logintMode == 0) |
| | | { |
| | | btnSwitchLoginMode.TextID = InternationalizationString.VerificationCodeLogin; |
| | | btnSwitchLoginMode.TextID = StringId.VerificationCodeLogin; |
| | | passwordView.AddChidren(btnVisiblePassword); |
| | | passwordView.AddChidren(btnDividingLineVertical_PasswordView2); |
| | | passwordView.AddChidren(btnForgetPassword); |
| | |
| | | //验证码登录 |
| | | else if (logintMode == 1) |
| | | { |
| | | btnSwitchLoginMode.TextID = InternationalizationString.PasswordLogin; |
| | | btnSwitchLoginMode.TextID = StringId.PasswordLogin; |
| | | passwordView.AddChidren(btnGetVerificationCode); |
| | | btnPasswordIcon.IsSelected = true; |
| | | if (btnVisiblePassword.Parent != null) |
| | |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | Text = Language.StringByID(InternationalizationString.PlsEntryCorrectMobilNeumber), |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber), |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | |
| | | } |
| | | else |
| | | { |
| | | if(! Regex.IsMatch(account, "^[\\w-]+@[\\w-]+\\.(com|net|org|edu|mil|tv|biz|info)$")) |
| | | if (!Regex.IsMatch(account, "^[\\w-]+@[\\w-]+\\.(com|net|org|edu|mil|tv|biz|info)$")) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | Text = Language.StringByID(InternationalizationString.PlsEntryCorrectEmailAddress), |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress), |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | |
| | | switch (loginResult.StateCode) |
| | | { |
| | | case "USERNAMEORPWDERROR": |
| | | tipStr = Language.StringByID(InternationalizationString.LoginFailed_AccountOrPasswordError); |
| | | tipStr = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError); |
| | | break; |
| | | case "Self:Net_Error": |
| | | tipStr = Language.StringByID(InternationalizationString.NetworkAnomaly); |
| | | tipStr = Language.StringByID(StringId.NetworkAnomaly); |
| | | break; |
| | | } |
| | | //账号或者密码错误 |
| | |
| | | { |
| | | var result = false; |
| | | var responsePack = pm.GetHomePager(); |
| | | if(responsePack.StateCode == "Success") |
| | | if (responsePack.StateCode == "Success") |
| | | { |
| | | var dataStr = Newtonsoft.Json.Linq.JObject.FromObject(responsePack.ResponseData); |
| | | //没有住宅 |
| | |
| | | switch (responsePack.StateCode) |
| | | { |
| | | case "NoLogin": |
| | | tipStr = Language.StringByID(InternationalizationString.InvalidLoginCertificate); |
| | | tipStr = Language.StringByID(StringId.InvalidLoginCertificate); |
| | | break; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | |
| | | /// </summary> |
| | | void LoadPage_RegisterPage() |
| | | { |
| | | btnRegister.MouseUpEventHandler += (sender, e) => { |
| | | btnRegister.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //回调事件 |
| | | Action<string> callBackAction = (callBackPar_Action) => |
| | | { |