liyubing

feat(信息流):处理二次请求批查获取的数据 响应稿件页面

... ... @@ -10,73 +10,74 @@
/*
信息流广告素材解析累
*/
export interface CompAdvMatInfoBean {
export class CompAdvMatInfoBean {
id:number = 0
/**
* 广告标题
*/
advTitle: string
advTitle: string = ''
/**
* 3:信息流广告
*/
advType: string
advType: string =''
/**
* 信息流广告类型(4:轮播图 5:三图广告 6:小图广告 7:长通栏广告 8:大图广告 9:视频广告 10:展会广告 11:冠名广告 12:顶部长通栏广告)
*/
advSubType: number
advSubType: number = 0
/**
* 素材图片信息;adv_subtype=4,5,6,7,8,9,12 时使用
*/
matImageUrl: string[]
matImageUrl: string[] = []
/**
* 视频广告地址(adv_subtype=9)
*/
matVideoUrl: string
matVideoUrl: string = ''
/**
* 扩展信息:advSubType=10,11时使用,字段示例见接口备注。
*/
extraData: string
extraData: string = ''
/**
* 链接类型: 0:无链接;1:内链(文章);2:外链
*/
linkType: string
linkType: string = ''
/**
* 链接跳转类型 :0-没链接,不用打开,1-端内打开,2-端外打开
*/
openType: string
openType: string = ''
/**
* 广告跳转链接
*/
linkUrl: string
linkUrl: string = ''
/**
* 素材类型(0:图片 1:视频)
*/
matType: string
matType: string = ''
/**
* 开屏样式(1:全屏样式 0:底部固定Logo)
*/
startStyle: string
startStyle: string = ''
}
/**
* 信息流广告位
*/
export interface CompAdvSlotInfoBean {
export class CompAdvSlotInfoBean {
/**
* 组件id
*/
compId: string;
compId: string = '';
/**
* 广告位位置 从1开始
*/
position: number;
position: number = 0;
/**
* 频道id
*/
channelId: string;
channelId: string = '';
}
\ No newline at end of file
... ...
... ... @@ -40,7 +40,7 @@ export class CompDTO implements BaseDTO {
/**
* 信息流广告素材
*/
matInfo: CompAdvMatInfoBean = {} as CompAdvMatInfoBean
matInfo: CompAdvMatInfoBean = new CompAdvMatInfoBean
pageId?: string;
objectType?: string;
hasMore: number = 1
... ...
... ... @@ -54,7 +54,7 @@ export struct CardAdvBottom {
let currentIndex = -1
for (let i = 0; i < this.pageModel.compList.size(); i++) {
let b = this.pageModel.compList.getData(i) as CompDTO
if (a.compStyle === b.compStyle && a.matInfo === b.matInfo) {
if (a.compStyle == b.compStyle && a.matInfo.id == b.matInfo.id) {
currentIndex = i
break;
}
... ...
... ... @@ -272,10 +272,11 @@ export class PageHelper {
let b = advPosition - a;
// console.error('ZZZXXXXX', matInfo.advSubType + '-------------' + matInfo.advTitle + " " + advPosition + " " + a + " " + b)
if (b <= pageCompSize && b >= 0) {
// 创建广告稿件
let advComp: CompDTO = new CompDTO;
advComp.compStyle = CompStyle.Card_Comp_Adv
advComp.matInfo = matInfo
if (pageCompSize == slotInfo.position) {
pageCompList.add(advComp)
} else {
... ...