private void getHomeData() {
    RequestParams params = RequestParam.getRequestParams(getActivity());
    params.put("pageCount", 20);
    client.post(
        HttpConfig.getGetHomelist(userId),
        params,
        new AsyncHttpResponseCallBack(getActivity()) {
          @Override
          public void onSuccess(int i, Header[] headers, byte[] bytes) {
            super.onSuccess(i, headers, bytes);
            try {
              Log.e("hot", new String(bytes));
              Type type = new TypeToken<HomeDataEntry>() {}.getType();
              homeData = gson.fromJson(new String(bytes), type);
              storeUrl = homeData.getData().getHost();
              SharedPreferenceUtil.getSharedEditor(getActivity())
                  .putString(SharedPreferenceUtil.HOST, storeUrl)
                  .commit();
              SharedPreferenceUtil.getSharedEditor(getActivity())
                  .putString(SharedPreferenceUtil.SEARCH_WORD, homeData.getData().getSearchWord())
                  .commit();
              FileUtil.writeData(FileUtil.TEXT_BACKUP, new String(bytes));
              hotWork = homeData.getData().getHotWorkTagList();
              mList.clear();
              mList.addAll(homeData.getData().getWorks().getWorks());
              handler.sendEmptyMessage(1);
            } catch (Exception e) {

            }
          }

          @Override
          public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) {}
        });
  }
  private void getListData() {
    RequestParams params = RequestParam.getRequestParams(getActivity());
    String workId = "";
    String lastId = "";
    String lastData = "";
    if (mList.size() != 0 && tempEntry != null) {
      workId = tempEntry.getData().getLastRank();
      lastId = tempEntry.getData().getLastWorkId();
      lastData = tempEntry.getData().getLastDate();
    } else {
      if (mList.size() != 0 && homeData != null) {
        workId = homeData.getData().getWorks().getLastRank();
        lastId = homeData.getData().getWorks().getLastWorkId();
        lastData = homeData.getData().getWorks().getLastDate();
      }
    }

    Log.e("work", workId);
    Queue queue = new Queue();
    queue.setWorksId("");
    queue.setLastRank(workId);
    queue.setLastWorkId(lastId);
    queue.setLastDate(lastData);
    queue.setText("");
    queue.setUserId("");
    queue.setUserId("-1");
    queue.setTemplateId("");
    queue.setTemplateTag("");
    queue.setHotPoint(-1);
    queue.setHotTagId(LID);
    queue.setDateNow("");
    queue.setTemplateFlag(-1);
    queue.setStatus("");
    String query = gson.toJson(queue);
    params.put("query", query);
    params.put("pageCount", 10);
    Log.e("param", params.toString());
    client.post(
        url,
        params,
        new AsyncHttpResponseCallBack(getActivity()) {
          @Override
          public void onSuccess(int i, Header[] headers, byte[] bytes) {
            super.onSuccess(i, headers, bytes);
            Log.e("json", new String(bytes));
            Type type = new TypeToken<TempEntry>() {}.getType();
            tempEntry = new TempEntry();
            try {
              tempEntry = gson.fromJson(new String(bytes), type);
              mList.addAll(tempEntry.getData().getWorks());
              //                adapter.setmList(mList);
              if (mList.size() > tempEntry.getData().getWorks().size()) {
                adapter.notifyItemRangeInserted(
                    mList.size() - tempEntry.getData().getWorks().size() + 1,
                    tempEntry.getData().getWorks().size());
              } else {
                adapter.notifyDataSetChanged();
              }

              //
            } catch (Exception ex) {
            }

            if (circleBar.isShowing()) {
              circleBar.dismiss();
            }
            refreshLayout.setRefreshing(false);
            progressBar_bottom.setVisibility(View.GONE);
          }

          @Override
          public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) {
            if (circleBar.isShowing()) {
              circleBar.dismiss();
            }
            refreshLayout.setRefreshing(false);
            progressBar_bottom.setVisibility(View.GONE);
          }
        });
  }