private void startSubmitTask() { if (regBiz != null) regBiz.cancel(); String pwdmd5 = Tools.getMD5Str(findpwd_pwd_ET.getText()).toUpperCase(Locale.US); regBiz = new FindPwdBiz( getApplicationContext(), new FindpwdHandler(FindPWDActivity_InputNewPWD.this), YtApplication.getInstance().getFindpwdPhone(), ACCOUTTYPE, pwdmd5); regBiz.execute(); }
@Override public void onClick(View v) { switch (v.getId()) { case R.id.registerTV: Intent intent1 = new Intent(getApplication(), RegisterActivity_Protocol.class); startActivity(intent1); break; case R.id.findpwdTV: Intent intent2 = new Intent(getApplication(), FindPWDActivity_InputPhone.class); startActivity(intent2); break; case R.id.loginButton: String userName = StringUtil.parseStr(userNameET.getText()); String pwdmd5 = Tools.getMD5Str(passwordET.getText()).toUpperCase(Locale.US); String password = StringUtil.parseStr(pwdmd5); LoginInfoBean loginInfoBean = new LoginInfoBean(); if (checkInputInfo(userName, password)) { loginInfoBean.setUsr_pwd(password); loginInfoBean.setUsr_account(userName.trim()); // YtApplication.getInstance().setUserName(userName.trim()); loadingoverlay.setVisibility(View.VISIBLE); loadingoverlay.setLoadingTip("正在登录,请稍候..."); startLoginTask(loginInfoBean); } else { String errmsg = getErrorMsg(); Toast.makeText(getApplicationContext(), errmsg, Toast.LENGTH_SHORT).show(); } break; default: } }