Commit 0909b53a896bcbdeb779af1a96a4f5529520cda1

Authored by 朱显松
2 parents 01643e3d 15f895b0

Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/CNLiveApp

Conflicts:
	app/src/main/java/com/cnlive/gundam/main/application/CNLiveApplication.java
app/src/main/java/com/cnlive/gundam/main/model/ActivePlayInfo.java
... ... @@ -35,7 +35,6 @@ public class ActivePlayInfo extends ErrorMessage {
35 35 private String endTime;
36 36 private String coverImgUrl;
37 37 private String activityCategory;
38   - private String extensions;
39 38 private String rates;
40 39 private String extViews;
41 40  
... ... @@ -122,14 +121,6 @@ public class ActivePlayInfo extends ErrorMessage {
122 121 this.activityCategory = activityCategory;
123 122 }
124 123  
125   - public String getExtensions() {
126   - return extensions;
127   - }
128   -
129   - public void setExtensions(String extensions) {
130   - this.extensions = extensions;
131   - }
132   -
133 124 public String getRates() {
134 125 return rates;
135 126 }
... ... @@ -159,7 +150,6 @@ public class ActivePlayInfo extends ErrorMessage {
159 150 ", endTime='" + endTime + '\'' +
160 151 ", coverImgUrl='" + coverImgUrl + '\'' +
161 152 ", activityCategory='" + activityCategory + '\'' +
162   - ", extensions='" + extensions + '\'' +
163 153 ", rates='" + rates + '\'' +
164 154 ", extViews='" + extViews + '\'' +
165 155 '}';
... ...
app/src/main/java/com/cnlive/gundam/main/network/ApiService.java
... ... @@ -9,6 +9,7 @@ import java.util.Map;
9 9  
10 10 import retrofit2.Call;
11 11 import retrofit2.http.GET;
  12 +import retrofit2.http.POST;
12 13 import retrofit2.http.QueryMap;
13 14  
14 15 /**
... ... @@ -26,7 +27,7 @@ public interface ApiService {
26 27 Call<ActivePlayInfo> getActivityPlayInfo(@QueryMap Map<String, String> options);
27 28  
28 29 //判断活动的状态
29   - @GET("vod_epg/getVodInfo4App")
  30 + @POST("vod_epg/getVodListInfo4App")
30 31 Call<VodListPage> getVodInfoList(@QueryMap Map<String, String> options);
31 32  
32 33 //主播信息接口
... ...
app/src/main/java/com/cnlive/gundam/main/ui/fragment/HomeFragment.java
... ... @@ -94,7 +94,7 @@ public class HomeFragment extends Fragment implements SwipeRefreshLayout.OnRefre
94 94 if (response.isSuccessful()) {
95 95 VodListPage model = response.body();
96 96 if (model != null && "0".equals(model.getCode())) {
97   - if (model.getData() == null) {
  97 + if (model.getData() == null || model.getData().size() <= 0) {
98 98 Toast.makeText(getActivity(), getString(R.string.request_null), Toast.LENGTH_LONG).show();
99 99 } else {
100 100 adapter.updateItems(model.getData());
... ...
app/src/main/java/com/cnlive/gundam/main/utils/ActivityJumpUtil.java
... ... @@ -2,6 +2,7 @@ package com.cnlive.gundam.main.utils;
2 2  
3 3 import android.content.Context;
4 4 import android.content.Intent;
  5 +import android.util.Log;
5 6 import android.widget.Toast;
6 7  
7 8 import com.cnlive.gundam.R;
... ... @@ -49,6 +50,7 @@ public class ActivityJumpUtil {
49 50  
50 51 @Override
51 52 public void onFailure(Call<ActivePlayInfo> call, Throwable t) {
  53 + Log.e("11111111111111", "onFailure: "+call.request().toString() );
52 54 Toast.makeText(context, context.getString(R.string.request_state_error), Toast.LENGTH_LONG).show();
53 55 }
54 56 });
... ...