From 62c8e38a87c5a1bc6949c234cc38a28ee6521372 Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Fri, 25 Oct 2024 15:57:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2banner=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/bean/SlideInBannerModel.java | 11 +++++++++++ .../main/java/com/yunbao/common/bean/UserBean.java | 9 +++++++++ .../com/yunbao/common/http/main/MainNetManager.java | 2 +- .../com/yunbao/main/views/MainHomeLiveViewHolder.java | 2 +- .../java/com/yunbao/main/views/MainMeViewHolder.java | 4 ++-- .../com/yunbao/main/views/MainMeViewHolder_PD.java | 4 ++-- 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/SlideInBannerModel.java b/common/src/main/java/com/yunbao/common/bean/SlideInBannerModel.java index 7bbc46510..7551d8eb7 100644 --- a/common/src/main/java/com/yunbao/common/bean/SlideInBannerModel.java +++ b/common/src/main/java/com/yunbao/common/bean/SlideInBannerModel.java @@ -16,6 +16,17 @@ public class SlideInBannerModel extends BaseModel { @SerializedName("slide") private List slide = new ArrayList<>(); + @SerializedName("slide_pic") + private List slide_pic = new ArrayList<>(); + + public List getSlide_pic() { + return slide_pic; + } + + public void setSlide_pic(List slide_pic) { + this.slide_pic = slide_pic; + } + public List getSlide() { return slide; } diff --git a/common/src/main/java/com/yunbao/common/bean/UserBean.java b/common/src/main/java/com/yunbao/common/bean/UserBean.java index ea81b93bc..6a4b2aac4 100644 --- a/common/src/main/java/com/yunbao/common/bean/UserBean.java +++ b/common/src/main/java/com/yunbao/common/bean/UserBean.java @@ -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; } diff --git a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java index ebb627e1c..3c515025d 100644 --- a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java @@ -219,7 +219,7 @@ public class MainNetManager { .observeOn(AndroidSchedulers.mainThread()) .subscribe(slideInBannerModelResponseModel -> { if (callback != null) { - List slideInfoModels = slideInBannerModelResponseModel.getData().getInfo().get(0).getSlide(); + List slideInfoModels = slideInBannerModelResponseModel.getData().getInfo().get(0).getSlide_pic(); callback.onSuccess(slideInfoModels); } }, throwable -> { diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 0c58c81e7..d1325b2fb 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -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; } diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 90c431fd2..596c46117 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -293,8 +293,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi private void showData(UserBean u, List 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); diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder_PD.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder_PD.java index c08418af1..66f4c59e4 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder_PD.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder_PD.java @@ -298,8 +298,8 @@ public class MainMeViewHolder_PD extends AbsMainViewHolder implements OnItemClic private void showData(UserBean u, List 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);