Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
liyubing
2024-05-15 18:52:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7cc07ab294ffc7d04eb7782926090ebcd9adeedb
7cc07ab2
1 parent
33e694d1
feat(信息流):处理二次请求批查获取的数据 响应稿件页面
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
19 deletions
sight_harmony/features/wdBean/src/main/ets/bean/adv/CompAdvInfoBean.ets
sight_harmony/features/wdBean/src/main/ets/bean/component/CompDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvBottom.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
sight_harmony/features/wdBean/src/main/ets/bean/adv/CompAdvInfoBean.ets
View file @
7cc07ab
...
...
@@ -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
...
...
sight_harmony/features/wdBean/src/main/ets/bean/component/CompDTO.ets
View file @
7cc07ab
...
...
@@ -40,7 +40,7 @@ export class CompDTO implements BaseDTO {
/**
* 信息流广告素材
*/
matInfo: CompAdvMatInfoBean =
{} as
CompAdvMatInfoBean
matInfo: CompAdvMatInfoBean =
new
CompAdvMatInfoBean
pageId?: string;
objectType?: string;
hasMore: number = 1
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvBottom.ets
View file @
7cc07ab
...
...
@@ -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;
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
View file @
7cc07ab
...
...
@@ -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 {
...
...
Please
register
or
login
to post a comment