liyubing

feat(信息流):优化广告稿件删除功能

... ... @@ -57,6 +57,9 @@ export class CompAdvMatInfoBean {
* 开屏样式(1:全屏样式 0:底部固定Logo)
*/
startStyle: string = ''
// 本地字段
originalPostion : 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.id == b.matInfo.id) {
if (a.compStyle == b.compStyle && a.matInfo.id == b.matInfo.id && a.matInfo.originalPostion == b.matInfo.originalPostion) {
currentIndex = i
break;
}
... ...
... ... @@ -66,7 +66,7 @@ export struct CardAdvTop {
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 && a.matInfo.originalPostion == b.matInfo.originalPostion) {
currentIndex = i
break;
}
... ...
... ... @@ -282,6 +282,7 @@ export class PageHelper {
} else {
pageCompList.insert(advComp, b + layoutAdvIndex)
}
matInfo.originalPostion = pageCompList.getIndexOf(advComp)
layoutAdvIndex = layoutAdvIndex + 1;
... ...