Ejemplo n.º 1
0
 @Override
 protected void setContentView() {
   setContentView(R.layout.activity_diancaitong);
   Intent intent = getIntent();
   imageID = intent.getStringExtra("ImageID");
   showProgressDialog("正在加载");
   RequestParams params = new RequestParams(this);
   params.put("imageId", imageID);
   execApi(ApiType.GET_MAINPART, params);
 }
Ejemplo n.º 2
0
  @Override
  protected void onViewClick(View v) {
    // TODO Auto-generated method stub
    switch (v.getId()) {
      case R.id.bt_smallmoney_confirm:
        if (!(et_smallmoney_jine.getText().toString().trim().length() == 0)) {
          RequestParams params = new RequestParams(this);
          params.put("amount", et_smallmoney_jine.getText().toString().trim());
          // params.put(RequestParams.MOBILE, username);
          params.put("certificateno", intent.getStringExtra("Certificateno"));
          params.put("moneyaccount", intent.getStringExtra("MoneyAccount"));
          params.put("depositacct", intent.getStringExtra("Depositacct"));
          params.put("custno", intent.getStringExtra("Custno"));
          params.put("depositacctname", intent.getStringExtra("DepositacctName"));
          params.put("channelid", intent.getStringExtra("ChannelId"));
          params.put("certificatetype", intent.getStringExtra("CertificateType"));
          execApi(ApiType.GET_CHKSMALLMONEY, params);
          showProgressDialog("正在加载");

        } else {
          showToast("打款金额为空!");
          return;
        }

        break;

      default:
        break;
    }
  }
 @Override
 protected void setContentView() {
   setContentView(R.layout.shortcut_activity_succes);
   RequestParams pam = new RequestParams(this);
   pam.put("DisplayName", getIntent().getStringExtra("DisplayName"));
   pam.put("Mobile", getIntent().getStringExtra("Mobile"));
   pam.put("IDcard", getIntent().getStringExtra("IDcard"));
   execApi(ApiType.GET_UPDATECRM, pam);
   RequestParams pms = new RequestParams(this);
   pms.put("idcard", getIntent().getStringExtra("IDcard"));
   execApi(ApiType.GET_STEPVERIFICATION, pms);
 }
Ejemplo n.º 4
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    activityMes = (MyPropertyMemberActivity) getActivity();

    Intent intent = activityMes.getIntent();
    idcard = intent.getStringExtra("idcard");

    RequestParams params = new RequestParams(activityMes);
    System.out.println("params我的详情-=-==-=-==-=<>" + params);
    params.put("idcard".trim(), idcard.trim());
    activityMes.execApi(ApiType.GET_SHOWDETAILSTWONEW, params, this);
    activityMes.showProgressDialog("正在加载");
  }
  @Override
  public void onReceiveData(ApiType api, String json) {
    if ("".equals(json) || json == null) {
      showToast("网络不给力");
      return;
    }
    if (api == ApiType.GET_STEPVERIFICATION) {
      if (json != null && !json.equals("")) {
        tInputStringStream = new ByteArrayInputStream(json.getBytes());
        XmlPullParser parser = Xml.newPullParser();
        try {
          parser.setInput(tInputStringStream, "UTF-8");
          int event = parser.getEventType();
          while (event != XmlPullParser.END_DOCUMENT) {
            Log.i("start_document", "start_document");
            switch (event) {
              case XmlPullParser.START_TAG:
                if ("return".equals(parser.getName())) {
                  String xmlReturn;
                  try {
                    xmlReturn = parser.nextText();
                    System.out.println("<><><><><><><><><>" + xmlReturn);
                    JSONObject jsonObj = new JSONObject(xmlReturn);
                    sessionid = jsonObj.getString("sessionid");
                    System.out.println("sessionid1------------>" + sessionid);
                    certificateno = jsonObj.getString("certificateno");
                    moneyaccount = jsonObj.getString("moneyaccount");
                    customRiskLevel = jsonObj.getString("risklevel");
                    countfund = jsonObj.getString("countfund");
                    depositacctname = jsonObj.getString("depositacctname");
                    channelid = jsonObj.getString("channelid");
                    depositacct = jsonObj.getString("depositacct");

                    custno = jsonObj.getString("custno");
                    totalfundmarketvalue = jsonObj.getString("totalfundmarketvalue");
                    custname = jsonObj.getString("custname");
                    certificatetype = jsonObj.getString("certificatetype");
                    App.getContext().setIdCard(getIntent().getStringExtra("IDcard"));
                    App.getContext().setUserName(getIntent().getStringExtra("DisplayName"));
                    App.getContext().setDepositacctName(getIntent().getStringExtra("DisplayName"));
                    App.getContext().setMobile(getIntent().getStringExtra("Mobile"));
                    App.getContext().setSessionid(sessionid);
                    RequestParams params = new RequestParams(this);
                    params.put("sessionId", sessionid);
                    params.put("papercode", "001");
                    // params.put("pointList",java.net.URLEncoder.encode(pointList));
                    params.put(
                        "pointList", java.net.URLEncoder.encode("2|2|2|2|2|2|2|2|2|2|2|2|2|2"));
                    params.put("iscontinue", "1");
                    // params.put("answer",java.net.URLEncoder.encode(answer));
                    params.put(
                        "answer",
                        java.net.URLEncoder.encode(
                            "undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined"));
                    params.put("invtp", "1");
                    execApi(ApiType.GET_RISKSUBMITTWO, params);

                  } catch (Exception e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                  }
                }
                break;
            }
            try {
              event = parser.next();

            } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
            }
          }
          try {
            tInputStringStream.close();
          } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }

        } catch (XmlPullParserException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }

    } else if (api == ApiType.GET_RISKSUBMITTWO) {
      if (json != null && !json.equals("")) {
        tInputStringStream = new ByteArrayInputStream(json.getBytes());
        XmlPullParser parser = Xml.newPullParser();
        try {
          parser.setInput(tInputStringStream, "UTF-8");
          int event = parser.getEventType();
          while (event != XmlPullParser.END_DOCUMENT) {
            Log.i("start_document", "start_document");
            switch (event) {
              case XmlPullParser.START_TAG:
                if ("return".equals(parser.getName())) {
                  String xmlReturn;
                  try {
                    xmlReturn = parser.nextText();
                    System.out.println("<><><><><><><><><>" + xmlReturn);
                    if (xmlReturn.contains("custrisk")) {
                      try {
                        JSONObject jsonObj = new JSONObject(xmlReturn);
                        showToast("提交成功");
                        shortcut_butt_up.setOnClickListener(
                            new OnClickListener() {

                              @Override
                              public void onClick(View v) {
                                Intent intent =
                                    new Intent(ShortcutSuccesActiviyt.this, MyActivityGroup.class);
                                System.out.println("111111111111111111111111111111111111");
                                intent.putExtra("IDCard", getIntent().getStringExtra("IDcard"));
                                System.out.println(
                                    "IDCard---->" + getIntent().getStringExtra("IDcard"));
                                intent.putExtra("DisplayName", depositacctname);
                                System.out.println("DisplayName---->" + depositacctname);
                                intent.putExtra(
                                    "UserName", getIntent().getStringExtra("DisplayName"));
                                System.out.println(
                                    "UserName---->" + getIntent().getStringExtra("DisplayName"));
                                intent.putExtra("sessionid", sessionid);
                                intent.putExtra("Mobile", getIntent().getStringExtra("Mobile"));
                                System.out.println(
                                    "Mobile---->" + getIntent().getStringExtra("Mobile"));
                                intent.putExtra("CustomRiskLevel", customRiskLevel);
                                System.out.println("customRiskLevel---->" + customRiskLevel);
                                intent.putExtra("DepositacctName", depositacctname);
                                System.out.println("depositacctname---->" + depositacctname);
                                intent.putExtra("TotalFundMarketValue", totalfundmarketvalue);
                                System.out.println(
                                    "totalfundmarketvalue---->" + totalfundmarketvalue);
                                intent.putExtra("CountFund", countfund);
                                System.out.println("countfund---->" + countfund);
                                intent.putExtra("certificateno", certificateno);
                                System.out.println("certificateno---->" + certificateno);
                                intent.putExtra("depositacct", depositacct);
                                System.out.println("depositacct---->" + depositacct);
                                intent.putExtra("certificatetype", certificatetype);
                                System.out.println("countfund---->" + certificatetype);
                                intent.putExtra("Moneyaccount", moneyaccount);
                                System.out.println("countfund---->" + moneyaccount);
                                intent.putExtra("Custno", custno);
                                System.out.println("custno---->" + custno);
                                intent.putExtra("channelid", channelid);
                                System.out.println("channelid---->" + channelid);
                                intent.putExtra("Flag", "5");
                                startActivity(intent);
                                finish();
                              }
                            });

                      } catch (JSONException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                      }

                    } else {
                      disMissDialog();
                      showToast("提交失败,请重新提交");
                    }

                  } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                  }
                }
                break;
            }
            try {
              event = parser.next();

            } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
            }
          }
          try {
            tInputStringStream.close();
          } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }

        } catch (XmlPullParserException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
    }
  }