得到分类接口 返回数据getTbk_uatm_favorites_item_get_response字段总为NULL
@Override
public void getContentByCateory(SelectedPageCategory.DataBean item) {
if (mMViewback == null) return;
//https://api.sunofbeach.net/shop/recommend/2011849236
String contentUrl = UrlUtils.getSelectPageContentUrl(item.getFavorites_id());
this.mCurrentItem = item;
mMViewback.onLoading();
Retrofit retrofit = RetrofitManager.getInstance().getRetrofit();
Api api = retrofit.create(Api.class);
Call<SelectedContent> task = api.getSelectedContent(contentUrl);
task.enqueue(new Callback<SelectedContent>() {
@Override
public void onResponse(Call<SelectedContent> call, Response<SelectedContent> response) {
int code = response.code();
if (code == HttpURLConnection.HTTP_OK) {
SelectedContent data = response.body();
//data.getData().getTbk_uatm_favorites_item_get_response().getResults();
Log.i("UatmTbkItemBean","UatmTbkItemBean"+data.getData());
以上是我的代码.. 经过调试发现.getTbk_uatm_favorites_item_get_response的字段为空. 服务器返回是正常的. CODE也是10000,浏览器直接访问也没问题,可以得到数据.. 是不是拉大锯老师修改了数据格式? 如果没有-我实在想不出问题了,会不会数据过多?请拉大锯老师帮忙解决一下.
bean类改了,先模拟请求,再去做开发。