替换banner图片
This commit is contained in:
parent
98f00304b9
commit
62c8e38a87
@ -16,6 +16,17 @@ public class SlideInBannerModel extends BaseModel {
|
||||
@SerializedName("slide")
|
||||
private List<SlideInfoModel> slide = new ArrayList<>();
|
||||
|
||||
@SerializedName("slide_pic")
|
||||
private List<SlideInfoModel> slide_pic = new ArrayList<>();
|
||||
|
||||
public List<SlideInfoModel> getSlide_pic() {
|
||||
return slide_pic;
|
||||
}
|
||||
|
||||
public void setSlide_pic(List<SlideInfoModel> slide_pic) {
|
||||
this.slide_pic = slide_pic;
|
||||
}
|
||||
|
||||
public List<SlideInfoModel> getSlide() {
|
||||
return slide;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ public class UserBean implements Parcelable {
|
||||
private String token_rong = "";
|
||||
private String noble_end_time;
|
||||
private String slide;
|
||||
private String slide_pic;
|
||||
private String users_type;
|
||||
private String is_bind;
|
||||
private String mobile;
|
||||
@ -94,6 +95,14 @@ public class UserBean implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSlide_pic() {
|
||||
return slide_pic;
|
||||
}
|
||||
|
||||
public void setSlide_pic(String slide_pic) {
|
||||
this.slide_pic = slide_pic;
|
||||
}
|
||||
|
||||
public int getTypeMic() {
|
||||
return typeMic;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public class MainNetManager {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(slideInBannerModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
List<SlideInfoModel> slideInfoModels = slideInBannerModelResponseModel.getData().getInfo().get(0).getSlide();
|
||||
List<SlideInfoModel> slideInfoModels = slideInBannerModelResponseModel.getData().getInfo().get(0).getSlide_pic();
|
||||
callback.onSuccess(slideInfoModels);
|
||||
}
|
||||
}, throwable -> {
|
||||
|
@ -231,7 +231,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
if (info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
|
||||
mBannerList = JSON.parseArray(obj.getString("slide"), BannerBean.class);
|
||||
mBannerList = JSON.parseArray(obj.getString("slide_pic"), BannerBean.class);
|
||||
if (!obj.containsKey("list")) {
|
||||
return new_data;
|
||||
}
|
||||
|
@ -293,8 +293,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
private void showData(UserBean u, List<UserItemBean> list) {
|
||||
mBannerList.clear();
|
||||
mBannerListNew.clear();
|
||||
if (!StringUtil.isEmpty(u.getSlide())) {
|
||||
mBannerListNew.addAll(JSON.parseArray(u.getSlide(), SlideBean.class));
|
||||
if (!StringUtil.isEmpty(u.getSlide_pic())) {
|
||||
mBannerListNew.addAll(JSON.parseArray(u.getSlide_pic(), SlideBean.class));
|
||||
for (SlideBean bean : mBannerListNew) {
|
||||
if (bean.getSlide_status().equals("1")) {
|
||||
mBannerList.add(bean);
|
||||
|
@ -298,8 +298,8 @@ public class MainMeViewHolder_PD extends AbsMainViewHolder implements OnItemClic
|
||||
private void showData(UserBean u, List<UserItemBean> list) {
|
||||
mBannerList.clear();
|
||||
mBannerListNew.clear();
|
||||
if (!StringUtil.isEmpty(u.getSlide())) {
|
||||
mBannerListNew.addAll(JSON.parseArray(u.getSlide(), SlideBean.class));
|
||||
if (!StringUtil.isEmpty(u.getSlide_pic())) {
|
||||
mBannerListNew.addAll(JSON.parseArray(u.getSlide_pic(), SlideBean.class));
|
||||
for (SlideBean bean : mBannerListNew) {
|
||||
if (bean.getSlide_status().equals("1")) {
|
||||
mBannerList.add(bean);
|
||||
|
Loading…
Reference in New Issue
Block a user