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