替换banner图片

This commit is contained in:
Martin 2024-10-25 15:57:55 +08:00
parent 98f00304b9
commit 62c8e38a87
6 changed files with 26 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 -> {

View File

@ -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;
}

View File

@ -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);

View File

@ -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);