| | |
| | | FrameLayout bodyView; |
| | | Button btnBind; |
| | | EditText etContent; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Action<string> action; |
| | | |
| | | /// <summary> |
| | |
| | | /// 是否换绑 |
| | | /// </summary> |
| | | bool isModifyBind; |
| | | |
| | | /// <summary> |
| | | /// 手机区号 |
| | | /// </summary> |
| | |
| | | if (!string.IsNullOrEmpty(code)) |
| | | { |
| | | phoneZoneCode = code; |
| | | codeView.btnSubtitle.Text = "+" + phoneZoneCode; |
| | | codeView.BtnSubtitle.Text = "+" + phoneZoneCode; |
| | | } |
| | | }); |
| | | }; |
| | | codeView.goAction = selectAction; |
| | | codeView.btnTilte.Text = Language.StringByID(StringId.CountryOrRegion); |
| | | codeView.btnSubtitle.Text = "+" + phoneZoneCode; |
| | | codeView.GoAction = selectAction; |
| | | codeView.BtnTilte.Text = Language.StringByID(StringId.CountryOrRegion); |
| | | codeView.BtnSubtitle.Text = "+" + phoneZoneCode; |
| | | |
| | | //手机号输入框 |
| | | FrameLayout rowView = new FrameLayout() |
| | |
| | | Y = Application.GetRealHeight(213), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | Y = Application.GetRealHeight(213), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | //加载Loading效果 |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | |
| | | int time = 0; |
| | | //2.检验通过 |
| | | new Thread(() => |
| | | { |
| | | //2.2 获取验证码 |
| | | ResponsePackNew resultObj; |
| | | if (!isPhone)//邮箱 |
| | | try |
| | | { |
| | | resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account); |
| | | } |
| | | else |
| | | { |
| | | resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account, true, phoneZoneCode); |
| | | } |
| | | |
| | | if (resultObj.Code != StateCode.SUCCESS) |
| | | { |
| | | // 提示错误 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | else |
| | | { |
| | | if (time == 0) |
| | | //2.2 获取验证码 |
| | | ResponsePackNew resultObj; |
| | | if (!isPhone)//邮箱 |
| | | { |
| | | time = 60; |
| | | new Thread(() => |
| | | resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account); |
| | | } |
| | | else |
| | | { |
| | | resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account, true, phoneZoneCode); |
| | | } |
| | | |
| | | if (resultObj.Code != StateCode.SUCCESS) |
| | | { |
| | | // 提示错误 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | else |
| | | { |
| | | if (time == 0) |
| | | { |
| | | while (time > 0) |
| | | time = 60; |
| | | new Thread(() => |
| | | { |
| | | time--; |
| | | while (time > 0) |
| | | { |
| | | time--; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | button.Text = time.ToString() + "s"; |
| | | }); |
| | | Thread.Sleep(1000); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | button.Text = time.ToString() + "s"; |
| | | button.IsSelected = true; |
| | | button.TextID = StringId.GetVerificationCode; |
| | | button.BackgroundColor = CSS_Color.MainColor; |
| | | time = 0; |
| | | }); |
| | | Thread.Sleep(1000); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | button.IsSelected = true; |
| | | button.TextID = StringId.GetVerificationCode; |
| | | button.BackgroundColor = CSS_Color.MainColor; |
| | | time = 0; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | button.BackgroundColor = CSS_Color.PromptingColor1; |
| | | var vcp = new NewBindVerificationCodePage(); |
| | | vcp.PhoneZoneCode = phoneZoneCode; |
| | | MainPage.BasePageView.AddChidren(vcp); |
| | | vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }); |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | button.BackgroundColor = CSS_Color.PromptingColor1; |
| | | var vcp = new NewBindVerificationCodePage(); |
| | | vcp.phoneZoneCode = phoneZoneCode; |
| | | MainPage.BasePageView.AddChidren(vcp); |
| | | vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |