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