| | |
| | | { |
| | | //检测当前配置域名是否一致,不一致则替换 |
| | | CheckAndSetUserRequestHost(result); |
| | | // |
| | | |
| | | //2.1请求获取验证码 |
| | | var resultObj = pm.VerificationCodeSend(VerifyType.VERIFY_LOGIN, account, true, phoneZoneCode); |
| | | if (resultObj.Code != StateCode.SUCCESS) |
| | | { |
| | | //2.2请求获取验证码失败 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | }); |
| | | // 提示错误 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.IsSelected = false; |
| | | btnGetVerificationCode.TextColor = CSS_Color.PromptingColor1; |
| | | }); |
| | | |
| | | new Thread(() => |
| | | { |
| | | while (time > 0) |
| | |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | //2.1请求获取验证码 |
| | | var resultObj = pm.VerificationCodeSend(VerifyType.VERIFY_LOGIN, account, true, phoneZoneCode); |
| | | if (resultObj.Code != StateCode.SUCCESS) |
| | | { |
| | | //2.2请求获取验证码失败 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | }); |
| | | // 提示错误 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | // btnGetVerificationCode.IsSelected = false ; |
| | | // btnGetVerificationCode.TextColor = CSS_Color.PromptingColor1; |
| | | // int time = 60; |
| | | // new Thread(() => |
| | | // { |
| | | // while (time > 0) |
| | | // { |
| | | // time--; |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnGetVerificationCode.Text = time.ToString() + "s"; |
| | | // }); |
| | | // Thread.Sleep(1000); |
| | | // } |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnGetVerificationCode.IsSelected = true; |
| | | // btnGetVerificationCode.TextID = StringId.GetVerificationCode; |
| | | // }); |
| | | // }) |
| | | // { IsBackground = true }.Start(); |
| | | // new Thread(() => |
| | | // { |
| | | // //获取验证码 |
| | | // var result = pm.GetLoginVerCode(phoneNumber); |
| | | // if (result.StateCode.ToUpper() == StateCode.SUCCESS_CODE) |
| | | // { |
| | | // } |
| | | // //登录失败 |
| | | // else |
| | | // { |
| | | // string tipStr = "Sever erorr"; |
| | | // switch (result.StateCode.ToUpper()) |
| | | // { |
| | | // case "USERNAMEORPWDERROR": |
| | | // tipStr = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | // btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | // }); |
| | | // break; |
| | | // case "ACCOUNTNOEXISTS": |
| | | // tipStr = Language.StringByID(StringId.ACCOUNTNOEXISTS); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | // btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | // }); |
| | | // break; |
| | | // case "SENDFAIL": |
| | | // tipStr = Language.StringByID(StringId.FailedToSendVerificationCode); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | // btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | // }); |
| | | // break; |
| | | // case "Self:Net_Error": |
| | | // tipStr = Language.StringByID(StringId.NetworkAnomaly); |
| | | // break; |
| | | // } |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // //提示原因 |
| | | // var tip = new Tip() |
| | | // { |
| | | // Text = tipStr, |
| | | // CloseTime = 1, |
| | | // Direction = AMPopTipDirection.None |
| | | // }; |
| | | // tip.Show(bodyView); |
| | | // }); |
| | | // } |
| | | // }) |
| | | // { IsBackground = true }.Start(); |
| | | } |
| | | }; |
| | | } |