@Override
 protected void onCreate(Bundle arg0) {
   super.onCreate(arg0);
   setContentViews(R.layout.act_register_captcha);
   init();
   updateView();
 }
 @Override
 public void setRequestNotSuc(String url, int statusCode, Header[] headers, JsonObject jo) {
   super.setRequestNotSuc(url, statusCode, headers, jo);
   ToastUtil.toastAlways(this, jo.getAsJsonPrimitive(HMApi.KEY_MSG).getAsString());
   if (url.equals(HMApiUser.CAPTCHA)) {
     setCaptchaAble();
   }
 }
 @Override
 public void setRequestErr(
     String url, int statusCode, Header[] headers, String str, Throwable throwable) {
   super.setRequestErr(url, statusCode, headers, str, throwable);
   ToastUtil.toastAlways(this, str);
   if (url.equals(HMApiUser.CAPTCHA)) {
     setCaptchaAble();
   }
 }
  @Override
  public void setRequestSuc(String url, int statusCode, Header[] headers, JsonObject jo) {
    super.setRequestSuc(url, statusCode, headers, jo);
    if (url.equals(HMApiUser.REGISTER)) {
      HMUserBean userbean =
          GsonUtil.fromJsonObj(jo.getAsJsonObject(HMApiUser.KEY_DATA), HMUserBean.class);
      userbean.setPassword(password);
      ((HMApp) getApplication()).getUserSP().saveUserBean(userbean);

      // 聊天系统注册
      HMApiChat.getInstance().register(this, phone, password);

      // 成功后默认登录
      RequestParams params = new RequestParams();
      params.put("accountName", phone);
      params.put("password", password);
      HMApiUser.getInstance().postLoginOnBack(((HMApp) getApplication()), userbean);

      HMNavUtil.goToNewAct(this, HMRegisterInfoAct.class);
      onBack(null);
    }
  }
 @Override
 public void setRequestFinish() {
   super.setRequestFinish();
   hideLoading();
 }