/** 获取验证码 */ private void doGetAuthcode() { if (TextUtils.isEmpty(retrieve_username_edt.getText().toString())) { retrieve_username_edt.showPopWindow(RetrievePasswordAuthcodeActivity.this, "请输入正确的手机号"); return; } getAuthcodeSMS(); timeCount = new TimeCount(180000L, 1000L); timeCount.start(); }
@Override public void afterTextChanged(Editable arg0) { if (retrieve_username_edt.length() > 0 && retrieve_authcode_edt.length() > 0) { retrieve_next_button.setEnabled(true); retrieve_next_button.setBackgroundResource(R.drawable.confirm_back_button_select); retrieveInfo.setMobile(retrieve_username_edt.getText().toString()); retrieveInfo.setVerifyCode(retrieve_authcode_edt.getText().toString()); } else { retrieve_next_button.setEnabled(false); retrieve_next_button.setBackgroundResource(R.drawable.submint_btn_unfocaus); } }
/** 获取验证码短信 */ private void getAuthcodeSMS() { PdaRequest<SmsInfoDto> requset = new PdaRequest<SmsInfoDto>(); SmsInfoDto smsDto = new SmsInfoDto(); smsDto.setMobile(retrieve_username_edt.getText().toString()); requset.setData(smsDto); SendSMSHanlder dataHanlder = new SendSMSHanlder(context, requset); dataHanlder.setOnDataReceiveListener(this); dataHanlder.startNetWork(); }
/** 进入设置密码 */ private void doGotoSetPassword() { if (retrieve_username_edt.getText().length() == 0) { retrieve_username_edt.showPopWindow(RetrievePasswordAuthcodeActivity.this, "请输入正确的手机号"); return; } if (!isCorrectAuthcode(retrieve_authcode_edt.getText().toString())) { retrieve_authcode_edt.showPopWindow(RetrievePasswordAuthcodeActivity.this, "请输入正确的验证码"); return; } myHandler.sendEmptyMessage(SHOW_PROGRESS); PdaRequest<MemberDto> request = new PdaRequest<MemberDto>(); retrieveInfo.setMobile(retrieve_username_edt.getText().toString()); retrieveInfo.setVerifyCode(retrieve_authcode_edt.getText().toString()); request.setData(retrieveInfo); SubmitRetrieveAuthcodeHandler dataHandler = new SubmitRetrieveAuthcodeHandler(context, request); dataHandler.setOnDataReceiveListener(this); dataHandler.startNetWork(); }