private void requestData() {
    String url = String.format(NetUrlMyInfo.USERINFOFORAPPLY, UserInfo.getInstance().getUserId());
    JsonRequest<UserInfoForApply> request =
        new JsonRequest<UserInfoForApply>(
            Method.GET,
            url,
            new RequestHandlerListener<UserInfoForApply>(getContext()) {

              @Override
              public void onStart(Request request) {
                super.onStart(request);
                // showDialog(request);
              }

              @Override
              public void onEnd(Request request) {
                super.onEnd(request);
                // hideDialog(request);
              }

              @Override
              public void onSuccess(String id, UserInfoForApply data) {
                // TODO Auto-generated method stub
                try {
                  fillData(data);
                } catch (Exception e) {

                }
              }
            },
            UserInfoForApply.class);
    send(request);
  }
 private void putParams(Item item) {
   if (!isNull(UserInfo.getInstance().getUserId())) {
     ParamsMap.put("userId", UserInfo.getInstance().getUserId());
     ParamsMap.put("loginId", UserInfo.getInstance().getUserId());
   }
   if (TextUtils.isEmpty(province)) ParamsMap.put("province", item.getCity());
   if (TextUtils.isEmpty(city)) ParamsMap.put("city", item.getProvince());
   ParamsMap.put("userName", ((TextView) findViewById(R.id.name_text)).getText().toString());
   if (!isNull(((TextView) findViewById(R.id.zsbh_Text)).getText().toString()))
     ParamsMap.put(
         "certificationNum", ((TextView) findViewById(R.id.zsbh_Text)).getText().toString());
   if (!isNull(((TextView) findViewById(R.id.jgmc_Text)).getText().toString()))
     ParamsMap.put("company", ((TextView) findViewById(R.id.jgmc_Text)).getText().toString());
   //		ParamsMap.put("ctime", String.valueOf(item.getCtime()));
   //		ParamsMap.put("experienceScope", "2");
   //		ParamsMap.put("id", String.valueOf(item.getId()));
   if (!isNull(((TextView) findViewById(R.id.sfz_Text)).getText().toString()))
     ParamsMap.put("identityId", ((TextView) findViewById(R.id.sfz_Text)).getText().toString());
   if (item != null && !isNull(item.getIntro())) ParamsMap.put("intro", item.getIntro());
   if (item != null && !isNull(item.getInvestDirection()))
     ParamsMap.put("investDirection", item.getInvestDirection());
   if (item != null && !isNull(item.getLabel())) ParamsMap.put("label", item.getLabel());
   if (item != null && !isNull(item.getMobile())) ParamsMap.put("mobile", item.getMobile());
   ParamsMap.put("qq", ((TextView) findViewById(R.id.qq_Text)).getText().toString());
   if (((RadioButton) findViewById(R.id.manRadio)).isChecked()) ParamsMap.put("sex", "1");
   else ParamsMap.put("sex", "2");
   if (((RadioButton) findViewById(R.id.tzgwRadio)).isChecked())
     ParamsMap.put("position", positionTG);
   else ParamsMap.put("position", positionFXS);
   ParamsMap.put("experienceScope", String.valueOf(workLimitIndex));
   ParamsMap.put("passportName", UserInfo.getInstance().getUserName());
   ParamsMap.put("writeNum", "1");
   if (item != null && !TextUtils.isEmpty(item.getHeadImage()))
     ParamsMap.put("headImage", item.getHeadImage());
   if (item != null && !TextUtils.isEmpty(item.getIdentityImage()))
     ParamsMap.put("identityImage", item.getIdentityImage());
 }
Пример #3
0
        @Override
        public void onUpdateOk(String id, RegistResultBean data) {
          if (data.getResultCode() == 0) {
            switch (type) {
              case TYPE_FIND_PASS:
                {
                  Toast.makeText(FindPass2Activity.this, "找回密码成功,请重新登录", Toast.LENGTH_SHORT).show();
                  Intent intent = new Intent(FindPass2Activity.this, LoginActivity.class);
                  intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                  startActivity(intent);
                  break;
                }
              case TYPE_NO_USERNAME_NO_MOBILE:
                {
                  Toast.makeText(FindPass2Activity.this, "完善信息成功", Toast.LENGTH_SHORT).show();
                  UserInfo.getInstance().setMobile(phoneNum);
                  UserInfo.getInstance().setUserName(userName);
                  UserInfo.saveUserInfo(FindPass2Activity.this, UserInfo.getInstance());
                  setResult(RESPONSE_UPDATE_SUCCESS);
                  Intent intent = new Intent(getContext(), StartQuestionnaireActivity.class);
                  startActivity(intent);
                  finish();
                  break;
                }
              case TYPE_NO_USERNAME_HAS_MOBILE:
                {
                  Toast.makeText(FindPass2Activity.this, "完善信息成功", Toast.LENGTH_SHORT).show();
                  UserInfo.getInstance().setUserName(userName);
                  UserInfo.saveUserInfo(FindPass2Activity.this, UserInfo.getInstance());
                  setResult(RESPONSE_UPDATE_SUCCESS);
                  Intent intent = new Intent(getContext(), StartQuestionnaireActivity.class);
                  startActivity(intent);
                  finish();
                  break;
                }
            }

          } else {
            Toast.makeText(FindPass2Activity.this, data.getResultMsg(), Toast.LENGTH_SHORT).show();
          }
        }