liyubing

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

@@ -57,6 +57,9 @@ export class CompAdvMatInfoBean { @@ -57,6 +57,9 @@ export class CompAdvMatInfoBean {
57 * 开屏样式(1:全屏样式 0:底部固定Logo) 57 * 开屏样式(1:全屏样式 0:底部固定Logo)
58 */ 58 */
59 startStyle: string = '' 59 startStyle: string = ''
  60 +
  61 + // 本地字段
  62 + originalPostion : number = -1 // 广告原始投放位置
60 } 63 }
61 64
62 /** 65 /**
@@ -54,7 +54,7 @@ export struct CardAdvBottom { @@ -54,7 +54,7 @@ export struct CardAdvBottom {
54 let currentIndex = -1 54 let currentIndex = -1
55 for (let i = 0; i < this.pageModel.compList.size(); i++) { 55 for (let i = 0; i < this.pageModel.compList.size(); i++) {
56 let b = this.pageModel.compList.getData(i) as CompDTO 56 let b = this.pageModel.compList.getData(i) as CompDTO
57 - if (a.compStyle == b.compStyle && a.matInfo.id == b.matInfo.id) { 57 + if (a.compStyle == b.compStyle && a.matInfo.id == b.matInfo.id && a.matInfo.originalPostion == b.matInfo.originalPostion) {
58 currentIndex = i 58 currentIndex = i
59 break; 59 break;
60 } 60 }
@@ -66,7 +66,7 @@ export struct CardAdvTop { @@ -66,7 +66,7 @@ export struct CardAdvTop {
66 let currentIndex = -1 66 let currentIndex = -1
67 for (let i = 0; i < this.pageModel.compList.size(); i++) { 67 for (let i = 0; i < this.pageModel.compList.size(); i++) {
68 let b = this.pageModel.compList.getData(i) as CompDTO 68 let b = this.pageModel.compList.getData(i) as CompDTO
69 - if (a.compStyle === b.compStyle && a.matInfo === b.matInfo) { 69 + if (a.compStyle == b.compStyle && a.matInfo.id == b.matInfo.id && a.matInfo.originalPostion == b.matInfo.originalPostion) {
70 currentIndex = i 70 currentIndex = i
71 break; 71 break;
72 } 72 }
@@ -282,6 +282,7 @@ export class PageHelper { @@ -282,6 +282,7 @@ export class PageHelper {
282 } else { 282 } else {
283 pageCompList.insert(advComp, b + layoutAdvIndex) 283 pageCompList.insert(advComp, b + layoutAdvIndex)
284 } 284 }
  285 + matInfo.originalPostion = pageCompList.getIndexOf(advComp)
285 286
286 layoutAdvIndex = layoutAdvIndex + 1; 287 layoutAdvIndex = layoutAdvIndex + 1;
287 288