zhangbo1_wd

直播大图卡片展示调整,将数据拆开,封到comp里

... ... @@ -25,6 +25,7 @@ const Normal_Page_Size = 20 // 常规每页数量
const Rec_Page_Size = 10 // 推荐每页数量
const SpecialComp: string[] = [CompStyle.Zh_Single_Column_03.toString()]
/**
* 处理返回后的数据
... ... @@ -379,7 +380,8 @@ export class PageHelper {
*/
private factoryCompArray(compList: CompDTO[]): ArrayList<CompDTO> {
let pageCompList: ArrayList<CompDTO> = new ArrayList() // 收集页面组件、稿件和本地组件容器
compList.forEach((element: CompDTO) => {
let newCompList = this.createSpecialComp(compList)
newCompList.forEach((element: CompDTO) => {
let contentInfo: ContentDTO = CollectionUtils.getElement(element.operDataList, 0);
//移除音频 和 活动
if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) {
... ... @@ -402,6 +404,41 @@ export class PageHelper {
}
/**
* 竖直方向list,将数据拆出来,组装成comp
*/
private createSpecialComp(compList: CompDTO[]): CompDTO[]{
if (!compList) {
return compList
}
let tmpList: CompDTO[] = []
compList.forEach((value, index) => {
if (SpecialComp.includes(value.compStyle)) {
let list = value.operDataList
if (list) {
if (list.length == 1) {
tmpList.push(value)
} else {
list.forEach((content) => {
let newComp = CompDTO.createNewsBean(value)
newComp.operDataList = []
// 特殊样式,comp只保留一个content,多余的一一拆成新的comp
newComp.operDataList.push(content)
tmpList.push(newComp)
})
}
} else {
tmpList.push(value)
}
} else {
tmpList.push(value)
}
})
// 重新赋值,将contentList拆出来了。
return tmpList
}
/**
* 信息流页面,所有稿件需要参与批查,如 批查评论、批查关注状态等接口
* @param compList
* @param pageModel
... ...