@Override
  public void setUpData() {
    showLoadingDialog(null, true);
    String method = Methods.METHOD_RECHARG_HISTORY;
    if (type == 2) {
      method = Methods.METHOD_WITHDRAW_HISTORY;
    }
    httpRequest(
        Params.getRechargeHistory(this),
        method,
        Environments.PV1,
        RechargeHistoryEntity.class,
        new RequestCallback() {
          @Override
          public void onRequestSucess(BaseEntity result, String jsonData) {
            closeLoadingDialog();
            if (result.isSucess()) {
              if (result instanceof RechargeHistoryEntity) {
                refreshList(((RechargeHistoryEntity) result).getTopup());
                listNull();
              }
            }
          }

          @Override
          public void onRequestFailed(String msg) {
            closeLoadingDialog();
          }
        });
  }
Beispiel #2
0
 private void getData(int type) {
   findViewById(R.id.null_tip).setVisibility(View.GONE);
   int current_page = 1;
   if (type == 1 && data != null) {
     current_page = Integer.valueOf(data.getCurrent_page()) + 1;
   }
   httpRequest(
       Params.getFinacialHistoryParams(this, p_id, current_page, 20),
       Methods.METHOD_PRODUCT_INVESTMENT_LIST,
       Environments.PV1,
       FinacialHistoryEntity.class,
       new ReqeustData(type));
 }