Showing
16 changed files
with
154 additions
and
99 deletions
| @@ -6,6 +6,9 @@ | @@ -6,6 +6,9 @@ | ||
| 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 7 | "specifiers": { | 7 | "specifiers": { |
| 8 | "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | 8 | "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", |
| 9 | + "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 10 | + "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 11 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 9 | "wdConstant@../wdConstant": "wdConstant@../wdConstant", | 12 | "wdConstant@../wdConstant": "wdConstant@../wdConstant", |
| 10 | "wdKit@../wdKit": "wdKit@../wdKit" | 13 | "wdKit@../wdKit": "wdKit@../wdKit" |
| 11 | }, | 14 | }, |
| @@ -16,6 +19,26 @@ | @@ -16,6 +19,26 @@ | ||
| 16 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | 19 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", |
| 17 | "registryType": "ohpm" | 20 | "registryType": "ohpm" |
| 18 | }, | 21 | }, |
| 22 | + "@umeng/analytics@1.0.19": { | ||
| 23 | + "name": "@umeng/analytics", | ||
| 24 | + "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 25 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 26 | + "registryType": "ohpm" | ||
| 27 | + }, | ||
| 28 | + "@umeng/common@1.0.21": { | ||
| 29 | + "name": "@umeng/common", | ||
| 30 | + "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 31 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 32 | + "registryType": "ohpm", | ||
| 33 | + "dependencies": { | ||
| 34 | + "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 35 | + } | ||
| 36 | + }, | ||
| 37 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 38 | + "name": "libcommon.so", | ||
| 39 | + "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 40 | + "registryType": "local" | ||
| 41 | + }, | ||
| 19 | "wdConstant@../wdConstant": { | 42 | "wdConstant@../wdConstant": { |
| 20 | "name": "wdconstant", | 43 | "name": "wdconstant", |
| 21 | "resolved": "../wdConstant", | 44 | "resolved": "../wdConstant", |
| @@ -24,7 +47,11 @@ | @@ -24,7 +47,11 @@ | ||
| 24 | "wdKit@../wdKit": { | 47 | "wdKit@../wdKit": { |
| 25 | "name": "wdkit", | 48 | "name": "wdkit", |
| 26 | "resolved": "../wdKit", | 49 | "resolved": "../wdKit", |
| 27 | - "registryType": "local" | 50 | + "registryType": "local", |
| 51 | + "dependencies": { | ||
| 52 | + "@umeng/common": "^1.0.21", | ||
| 53 | + "@umeng/analytics": "^1.0.19" | ||
| 54 | + } | ||
| 28 | } | 55 | } |
| 29 | } | 56 | } |
| 30 | } | 57 | } |
| @@ -103,7 +103,7 @@ export struct CompParser { | @@ -103,7 +103,7 @@ export struct CompParser { | ||
| 103 | ZhSingleColumn09({ compDTO }) | 103 | ZhSingleColumn09({ compDTO }) |
| 104 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 104 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 105 | } else if (compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 | 105 | } else if (compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 |
| 106 | - AdvCardParser({pageModel:this.pageModel,compDTO,compIndex}) | 106 | + AdvCardParser({pageModel:this.pageModel,compDTO}) |
| 107 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) | 107 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) |
| 108 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 108 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 109 | } else if (!Number.isNaN(Number(compDTO.compStyle))) { | 109 | } else if (!Number.isNaN(Number(compDTO.compStyle))) { |
| @@ -21,29 +21,28 @@ import PageModel from '../../viewmodel/PageModel'; | @@ -21,29 +21,28 @@ import PageModel from '../../viewmodel/PageModel'; | ||
| 21 | export struct AdvCardParser { | 21 | export struct AdvCardParser { |
| 22 | @State compDTO: CompDTO = {} as CompDTO; | 22 | @State compDTO: CompDTO = {} as CompDTO; |
| 23 | pageModel: PageModel = new PageModel(); | 23 | pageModel: PageModel = new PageModel(); |
| 24 | - @State compIndex: number = 0; | ||
| 25 | 24 | ||
| 26 | build() { | 25 | build() { |
| 27 | - this.contentBuilder(this.pageModel, this.compDTO, this.compIndex); | 26 | + this.contentBuilder(this.pageModel, this.compDTO); |
| 28 | } | 27 | } |
| 29 | 28 | ||
| 30 | @Builder | 29 | @Builder |
| 31 | - contentBuilder(pageModel: PageModel, compDTO: CompDTO, compIndex: number) { | 30 | + contentBuilder(pageModel: PageModel, compDTO: CompDTO) { |
| 32 | if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告 | 31 | if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告 |
| 33 | - CardAdvThreeImageComponent({ pageModel, compDTO, compIndex }) | 32 | + CardAdvThreeImageComponent({ pageModel, compDTO }) |
| 34 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告 | 33 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告 |
| 35 | - CardAdvSmallImageComponent({ pageModel, compDTO, compIndex }) | 34 | + CardAdvSmallImageComponent({ pageModel, compDTO }) |
| 36 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 || | 35 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 || |
| 37 | compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告 | 36 | compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告 |
| 38 | - CardAdvLongImageComponent({ pageModel, compDTO, compIndex }) | 37 | + CardAdvLongImageComponent({ pageModel, compDTO }) |
| 39 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告 | 38 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告 |
| 40 | - CardAdvBigImageComponent({ pageModel, compDTO, compIndex }) | 39 | + CardAdvBigImageComponent({ pageModel, compDTO }) |
| 41 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告 | 40 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告 |
| 42 | - CardAdvVideoComponent({ pageModel, compDTO, compIndex }) | 41 | + CardAdvVideoComponent({ pageModel, compDTO }) |
| 43 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告 | 42 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告 |
| 44 | - CardAdvVideoExComponent({ pageModel, compDTO, compIndex }) | 43 | + CardAdvVideoExComponent({ pageModel, compDTO}) |
| 45 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告 | 44 | } else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告 |
| 46 | - CardAdvGanMiComponent({ pageModel, compDTO, compIndex }) | 45 | + CardAdvGanMiComponent({ pageModel, compDTO }) |
| 47 | } | 46 | } |
| 48 | } | 47 | } |
| 49 | } | 48 | } |
| @@ -17,7 +17,6 @@ const TAG: string = 'Card2Component'; | @@ -17,7 +17,6 @@ const TAG: string = 'Card2Component'; | ||
| 17 | @Component | 17 | @Component |
| 18 | export struct CardAdvBigImageComponent { | 18 | export struct CardAdvBigImageComponent { |
| 19 | @State compDTO: CompDTO = {} as CompDTO | 19 | @State compDTO: CompDTO = {} as CompDTO |
| 20 | - @State compIndex: number = 0; | ||
| 21 | pageModel: PageModel = new PageModel(); | 20 | pageModel: PageModel = new PageModel(); |
| 22 | aboutToAppear(): void { | 21 | aboutToAppear(): void { |
| 23 | 22 | ||
| @@ -42,7 +41,7 @@ export struct CardAdvBigImageComponent { | @@ -42,7 +41,7 @@ export struct CardAdvBigImageComponent { | ||
| 42 | .borderColor($r('app.color.color_0D000000')) | 41 | .borderColor($r('app.color.color_0D000000')) |
| 43 | .width(CommonConstants.FULL_WIDTH) | 42 | .width(CommonConstants.FULL_WIDTH) |
| 44 | 43 | ||
| 45 | - CardAdvBottom({pageModel:this.pageModel,compIndex:this.compIndex}).margin({ | 44 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).margin({ |
| 46 | top: 8, | 45 | top: 8, |
| 47 | }) | 46 | }) |
| 48 | } | 47 | } |
| 1 | +import { CompDTO } from 'wdBean/Index'; | ||
| 2 | +import { Logger } from 'wdKit/Index'; | ||
| 1 | import PageModel from '../../viewmodel/PageModel'; | 3 | import PageModel from '../../viewmodel/PageModel'; |
| 2 | 4 | ||
| 3 | /** | 5 | /** |
| @@ -10,9 +12,8 @@ import PageModel from '../../viewmodel/PageModel'; | @@ -10,9 +12,8 @@ import PageModel from '../../viewmodel/PageModel'; | ||
| 10 | */ | 12 | */ |
| 11 | @Component | 13 | @Component |
| 12 | export struct CardAdvBottom { | 14 | export struct CardAdvBottom { |
| 13 | - | ||
| 14 | pageModel: PageModel = new PageModel(); | 15 | pageModel: PageModel = new PageModel(); |
| 15 | - @State compIndex: number = 0; | 16 | + @State compDTO: CompDTO = {} as CompDTO |
| 16 | 17 | ||
| 17 | build() { | 18 | build() { |
| 18 | 19 | ||
| @@ -40,9 +41,28 @@ export struct CardAdvBottom { | @@ -40,9 +41,28 @@ export struct CardAdvBottom { | ||
| 40 | 41 | ||
| 41 | }.width('100%').onClick(() => { | 42 | }.width('100%').onClick(() => { |
| 42 | 43 | ||
| 43 | - if (this.pageModel) { | ||
| 44 | - // this.pageModel.compList.deleteItem(this.compIndex) | ||
| 45 | - } | 44 | + this.delComp() |
| 46 | }) | 45 | }) |
| 47 | } | 46 | } |
| 47 | + /** | ||
| 48 | + * 删除稿件 | ||
| 49 | + */ | ||
| 50 | + private delComp() { | ||
| 51 | + if (this.pageModel) { | ||
| 52 | + | ||
| 53 | + let a = this.compDTO; | ||
| 54 | + let currentIndex = -1 | ||
| 55 | + for (let i = 0; i < this.pageModel.compList.size(); i++) { | ||
| 56 | + let b = this.pageModel.compList.getData(i) | ||
| 57 | + if (a.compStyle === b.compStyle && a.matInfo === b.matInfo) { | ||
| 58 | + currentIndex = i | ||
| 59 | + break; | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | + Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex); | ||
| 63 | + if (currentIndex >= 0) { | ||
| 64 | + this.pageModel.compList.deleteItem(currentIndex) | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | + } | ||
| 48 | } | 68 | } |
| @@ -24,7 +24,6 @@ export struct CardAdvGanMiComponent { | @@ -24,7 +24,6 @@ export struct CardAdvGanMiComponent { | ||
| 24 | @State compDTO: CompDTO = {} as CompDTO | 24 | @State compDTO: CompDTO = {} as CompDTO |
| 25 | @State advExtraData: AdvExtraData = {} as AdvExtraData | 25 | @State advExtraData: AdvExtraData = {} as AdvExtraData |
| 26 | @State advLength: number = 0; | 26 | @State advLength: number = 0; |
| 27 | - @State compIndex: number = 0; | ||
| 28 | pageModel: PageModel = new PageModel(); | 27 | pageModel: PageModel = new PageModel(); |
| 29 | 28 | ||
| 30 | aboutToAppear(): void { | 29 | aboutToAppear(): void { |
| @@ -57,7 +56,7 @@ export struct CardAdvGanMiComponent { | @@ -57,7 +56,7 @@ export struct CardAdvGanMiComponent { | ||
| 57 | .borderColor($r('app.color.color_0D000000')) | 56 | .borderColor($r('app.color.color_0D000000')) |
| 58 | 57 | ||
| 59 | // 广告标签和删除功能 | 58 | // 广告标签和删除功能 |
| 60 | - CardAdvTop({ pageModel: this.pageModel, compIndex: this.compIndex }) | 59 | + CardAdvTop({ pageModel: this.pageModel, compDTO: this.compDTO }) |
| 61 | } | 60 | } |
| 62 | .alignContent(Alignment.Top) | 61 | .alignContent(Alignment.Top) |
| 63 | .width(CommonConstants.FULL_WIDTH) | 62 | .width(CommonConstants.FULL_WIDTH) |
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvLongImageComponent.ets
| @@ -19,7 +19,6 @@ const TAG: string = 'Card2Component'; | @@ -19,7 +19,6 @@ const TAG: string = 'Card2Component'; | ||
| 19 | export struct CardAdvLongImageComponent { | 19 | export struct CardAdvLongImageComponent { |
| 20 | @State compDTO: CompDTO = {} as CompDTO | 20 | @State compDTO: CompDTO = {} as CompDTO |
| 21 | @State haveTitle: boolean = true | 21 | @State haveTitle: boolean = true |
| 22 | - @State compIndex: number = 0; | ||
| 23 | pageModel: PageModel = new PageModel(); | 22 | pageModel: PageModel = new PageModel(); |
| 24 | 23 | ||
| 25 | aboutToAppear(): void { | 24 | aboutToAppear(): void { |
| @@ -45,7 +44,7 @@ export struct CardAdvLongImageComponent { | @@ -45,7 +44,7 @@ export struct CardAdvLongImageComponent { | ||
| 45 | .borderWidth(0.5) | 44 | .borderWidth(0.5) |
| 46 | .borderColor($r('app.color.color_0D000000')) | 45 | .borderColor($r('app.color.color_0D000000')) |
| 47 | 46 | ||
| 48 | - CardAdvBottom({ pageModel: this.pageModel, compIndex: this.compIndex }).margin({ | 47 | + CardAdvBottom({ pageModel: this.pageModel, compDTO:this.compDTO }).margin({ |
| 49 | top: 8, | 48 | top: 8, |
| 50 | }) | 49 | }) |
| 51 | } | 50 | } |
| @@ -21,7 +21,6 @@ const TAG: string = 'CardAdvSmallImageComponent'; | @@ -21,7 +21,6 @@ const TAG: string = 'CardAdvSmallImageComponent'; | ||
| 21 | export struct CardAdvSmallImageComponent { | 21 | export struct CardAdvSmallImageComponent { |
| 22 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 23 | @State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true | 23 | @State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true |
| 24 | - @State compIndex: number = 0; | ||
| 25 | pageModel: PageModel = new PageModel(); | 24 | pageModel: PageModel = new PageModel(); |
| 26 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| 27 | 26 | ||
| @@ -70,7 +69,7 @@ export struct CardAdvSmallImageComponent { | @@ -70,7 +69,7 @@ export struct CardAdvSmallImageComponent { | ||
| 70 | .margin({ left: 12 }) | 69 | .margin({ left: 12 }) |
| 71 | 70 | ||
| 72 | 71 | ||
| 73 | - CardAdvBottom({pageModel:this.pageModel,compIndex:this.compIndex}).width('62%').id('bottom_adv').alignRules({ | 72 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).width('62%').id('bottom_adv').alignRules({ |
| 74 | bottom: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: VerticalAlign.Bottom }, | 73 | bottom: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: VerticalAlign.Bottom }, |
| 75 | right: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: HorizontalAlign.Start }, | 74 | right: { anchor: this.isBigThreeLine ? '' : 'adv_imag', align: HorizontalAlign.Start }, |
| 76 | top: { anchor: this.isBigThreeLine ? 'title_name' : '', align: VerticalAlign.Bottom }, | 75 | top: { anchor: this.isBigThreeLine ? 'title_name' : '', align: VerticalAlign.Bottom }, |
| @@ -20,7 +20,6 @@ const TAG: string = 'Card2Component'; | @@ -20,7 +20,6 @@ const TAG: string = 'Card2Component'; | ||
| 20 | @Component | 20 | @Component |
| 21 | export struct CardAdvThreeImageComponent { | 21 | export struct CardAdvThreeImageComponent { |
| 22 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 23 | - @State compIndex: number = 0; | ||
| 24 | pageModel: PageModel = new PageModel(); | 23 | pageModel: PageModel = new PageModel(); |
| 25 | aboutToAppear(): void { | 24 | aboutToAppear(): void { |
| 26 | 25 | ||
| @@ -65,7 +64,7 @@ export struct CardAdvThreeImageComponent { | @@ -65,7 +64,7 @@ export struct CardAdvThreeImageComponent { | ||
| 65 | .margin({ top: 8 }) | 64 | .margin({ top: 8 }) |
| 66 | 65 | ||
| 67 | // 广告工具组件 | 66 | // 广告工具组件 |
| 68 | - CardAdvBottom({pageModel:this.pageModel,compIndex:this.compIndex}).width('100%').margin({ top: 8 }) | 67 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).width('100%').margin({ top: 8 }) |
| 69 | } | 68 | } |
| 70 | .width('100%') | 69 | .width('100%') |
| 71 | .justifyContent(FlexAlign.Start) | 70 | .justifyContent(FlexAlign.Start) |
| 1 | +import { CompDTO } from 'wdBean/Index'; | ||
| 2 | +import { Logger } from 'wdKit/Index'; | ||
| 1 | import PageModel from '../../viewmodel/PageModel'; | 3 | import PageModel from '../../viewmodel/PageModel'; |
| 2 | 4 | ||
| 3 | /** | 5 | /** |
| @@ -10,8 +12,8 @@ import PageModel from '../../viewmodel/PageModel'; | @@ -10,8 +12,8 @@ import PageModel from '../../viewmodel/PageModel'; | ||
| 10 | */ | 12 | */ |
| 11 | @Component | 13 | @Component |
| 12 | export struct CardAdvTop { | 14 | export struct CardAdvTop { |
| 13 | - @State compIndex: number = 0; | ||
| 14 | pageModel: PageModel = new PageModel(); | 15 | pageModel: PageModel = new PageModel(); |
| 16 | + compDTO: CompDTO = {} as CompDTO | ||
| 15 | 17 | ||
| 16 | build() { | 18 | build() { |
| 17 | 19 | ||
| @@ -50,10 +52,30 @@ export struct CardAdvTop { | @@ -50,10 +52,30 @@ export struct CardAdvTop { | ||
| 50 | left: 8, | 52 | left: 8, |
| 51 | right: 8 | 53 | right: 8 |
| 52 | }).onClick(() => { | 54 | }).onClick(() => { |
| 53 | - if (this.pageModel) { | ||
| 54 | - this.pageModel.compList.deleteItem(this.compIndex) | 55 | + this.delComp() |
| 56 | + }) | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 60 | + * 删除稿件 | ||
| 61 | + */ | ||
| 62 | + private delComp() { | ||
| 63 | + if (this.pageModel) { | ||
| 64 | + | ||
| 65 | + let a = this.compDTO; | ||
| 66 | + let currentIndex = -1 | ||
| 67 | + for (let i = 0; i < this.pageModel.compList.size(); i++) { | ||
| 68 | + let b = this.pageModel.compList.getData(i) | ||
| 69 | + if (a.compStyle === b.compStyle && a.matInfo === b.matInfo) { | ||
| 70 | + currentIndex = i | ||
| 71 | + break; | ||
| 72 | + } | ||
| 55 | } | 73 | } |
| 56 | 74 | ||
| 57 | - }) | 75 | + Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex); |
| 76 | + if (currentIndex >= 0) { | ||
| 77 | + this.pageModel.compList.deleteItem(currentIndex) | ||
| 78 | + } | ||
| 79 | + } | ||
| 58 | } | 80 | } |
| 59 | } | 81 | } |
| @@ -21,7 +21,6 @@ const TAG: string = 'Card2Component'; | @@ -21,7 +21,6 @@ const TAG: string = 'Card2Component'; | ||
| 21 | export struct CardAdvVideoComponent { | 21 | export struct CardAdvVideoComponent { |
| 22 | @State compDTO: CompDTO = {} as CompDTO | 22 | @State compDTO: CompDTO = {} as CompDTO |
| 23 | @State contentDTO: ContentDTO = {} as ContentDTO | 23 | @State contentDTO: ContentDTO = {} as ContentDTO |
| 24 | - @State compIndex: number = 0; | ||
| 25 | pageModel: PageModel = new PageModel(); | 24 | pageModel: PageModel = new PageModel(); |
| 26 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| 27 | 26 | ||
| @@ -56,7 +55,7 @@ export struct CardAdvVideoComponent { | @@ -56,7 +55,7 @@ export struct CardAdvVideoComponent { | ||
| 56 | .width(CommonConstants.FULL_WIDTH) | 55 | .width(CommonConstants.FULL_WIDTH) |
| 57 | .margin({ top: 8 }) | 56 | .margin({ top: 8 }) |
| 58 | 57 | ||
| 59 | - CardAdvBottom({pageModel:this.pageModel,compIndex:this.compIndex}).margin({ | 58 | + CardAdvBottom({pageModel:this.pageModel,compDTO:this.compDTO}).margin({ |
| 60 | top: 8, | 59 | top: 8, |
| 61 | }) | 60 | }) |
| 62 | } | 61 | } |
| @@ -20,7 +20,6 @@ const TAG: string = 'Card2Component'; | @@ -20,7 +20,6 @@ const TAG: string = 'Card2Component'; | ||
| 20 | export struct CardAdvVideoExComponent { | 20 | export struct CardAdvVideoExComponent { |
| 21 | @State compDTO: CompDTO = {} as CompDTO | 21 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | @State advExtraData: AdvExtraData = {} as AdvExtraData | 22 | @State advExtraData: AdvExtraData = {} as AdvExtraData |
| 23 | - @State compIndex: number = 0; | ||
| 24 | pageModel: PageModel = new PageModel(); | 23 | pageModel: PageModel = new PageModel(); |
| 25 | 24 | ||
| 26 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| @@ -49,7 +48,7 @@ export struct CardAdvVideoExComponent { | @@ -49,7 +48,7 @@ export struct CardAdvVideoExComponent { | ||
| 49 | .borderColor($r('app.color.color_0D000000')) | 48 | .borderColor($r('app.color.color_0D000000')) |
| 50 | 49 | ||
| 51 | 50 | ||
| 52 | - CardAdvTop({ pageModel: this.pageModel, compIndex: this.compIndex }) | 51 | + CardAdvTop({ pageModel: this.pageModel, compDTO: this.compDTO }) |
| 53 | } | 52 | } |
| 54 | .alignContent(Alignment.Top) | 53 | .alignContent(Alignment.Top) |
| 55 | .width(CommonConstants.FULL_WIDTH) | 54 | .width(CommonConstants.FULL_WIDTH) |
| @@ -171,7 +171,7 @@ export class PageHelper { | @@ -171,7 +171,7 @@ export class PageHelper { | ||
| 171 | let layoutAdvIndex = 0; //稿件投放统计 | 171 | let layoutAdvIndex = 0; //稿件投放统计 |
| 172 | // 升序排序 | 172 | // 升序排序 |
| 173 | compAdvList.sort((a: CompAdvBean, b: CompAdvBean) => a.slotInfo.position - b.slotInfo.position) | 173 | compAdvList.sort((a: CompAdvBean, b: CompAdvBean) => a.slotInfo.position - b.slotInfo.position) |
| 174 | - // console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList)); | 174 | + // console.error("ZZZXXXXX", " 排序后的广告--->" + JSON.stringify(compAdvList)); |
| 175 | //当前日期 | 175 | //当前日期 |
| 176 | let serverTimeLong: number = DateTimeUtils.getTimeStamp(); | 176 | let serverTimeLong: number = DateTimeUtils.getTimeStamp(); |
| 177 | for (let advBean of compAdvList) { | 177 | for (let advBean of compAdvList) { |
| @@ -5,13 +5,40 @@ | @@ -5,13 +5,40 @@ | ||
| 5 | "lockfileVersion": 3, | 5 | "lockfileVersion": 3, |
| 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 7 | "specifiers": { | 7 | "specifiers": { |
| 8 | + "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 9 | + "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 10 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 8 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit" | 11 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit" |
| 9 | }, | 12 | }, |
| 10 | "packages": { | 13 | "packages": { |
| 14 | + "@umeng/analytics@1.0.19": { | ||
| 15 | + "name": "@umeng/analytics", | ||
| 16 | + "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 17 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 18 | + "registryType": "ohpm" | ||
| 19 | + }, | ||
| 20 | + "@umeng/common@1.0.21": { | ||
| 21 | + "name": "@umeng/common", | ||
| 22 | + "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 23 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 24 | + "registryType": "ohpm", | ||
| 25 | + "dependencies": { | ||
| 26 | + "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 27 | + } | ||
| 28 | + }, | ||
| 29 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 30 | + "name": "libcommon.so", | ||
| 31 | + "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 32 | + "registryType": "local" | ||
| 33 | + }, | ||
| 11 | "wdKit@../../commons/wdKit": { | 34 | "wdKit@../../commons/wdKit": { |
| 12 | "name": "wdkit", | 35 | "name": "wdkit", |
| 13 | "resolved": "../../commons/wdKit", | 36 | "resolved": "../../commons/wdKit", |
| 14 | - "registryType": "local" | 37 | + "registryType": "local", |
| 38 | + "dependencies": { | ||
| 39 | + "@umeng/common": "^1.0.21", | ||
| 40 | + "@umeng/analytics": "^1.0.19" | ||
| 41 | + } | ||
| 15 | } | 42 | } |
| 16 | } | 43 | } |
| 17 | } | 44 | } |
| @@ -6,6 +6,9 @@ | @@ -6,6 +6,9 @@ | ||
| 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | 6 | "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |
| 7 | "specifiers": { | 7 | "specifiers": { |
| 8 | "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | 8 | "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", |
| 9 | + "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 10 | + "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 11 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 9 | "wdBean@../wdBean": "wdBean@../wdBean", | 12 | "wdBean@../wdBean": "wdBean@../wdBean", |
| 10 | "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | 13 | "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", |
| 11 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | 14 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", |
| @@ -20,6 +23,26 @@ | @@ -20,6 +23,26 @@ | ||
| 20 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | 23 | "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", |
| 21 | "registryType": "ohpm" | 24 | "registryType": "ohpm" |
| 22 | }, | 25 | }, |
| 26 | + "@umeng/analytics@1.0.19": { | ||
| 27 | + "name": "@umeng/analytics", | ||
| 28 | + "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 29 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 30 | + "registryType": "ohpm" | ||
| 31 | + }, | ||
| 32 | + "@umeng/common@1.0.21": { | ||
| 33 | + "name": "@umeng/common", | ||
| 34 | + "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 35 | + "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 36 | + "registryType": "ohpm", | ||
| 37 | + "dependencies": { | ||
| 38 | + "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 39 | + } | ||
| 40 | + }, | ||
| 41 | + "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 42 | + "name": "libcommon.so", | ||
| 43 | + "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 44 | + "registryType": "local" | ||
| 45 | + }, | ||
| 23 | "wdBean@../wdBean": { | 46 | "wdBean@../wdBean": { |
| 24 | "name": "wdbean", | 47 | "name": "wdbean", |
| 25 | "resolved": "../wdBean", | 48 | "resolved": "../wdBean", |
| @@ -33,7 +56,11 @@ | @@ -33,7 +56,11 @@ | ||
| 33 | "wdKit@../../commons/wdKit": { | 56 | "wdKit@../../commons/wdKit": { |
| 34 | "name": "wdkit", | 57 | "name": "wdkit", |
| 35 | "resolved": "../../commons/wdKit", | 58 | "resolved": "../../commons/wdKit", |
| 36 | - "registryType": "local" | 59 | + "registryType": "local", |
| 60 | + "dependencies": { | ||
| 61 | + "@umeng/common": "^1.0.21", | ||
| 62 | + "@umeng/analytics": "^1.0.19" | ||
| 63 | + } | ||
| 37 | }, | 64 | }, |
| 38 | "wdNetwork@../../commons/wdNetwork": { | 65 | "wdNetwork@../../commons/wdNetwork": { |
| 39 | "name": "wdnetwork", | 66 | "name": "wdnetwork", |
| @@ -12,13 +12,8 @@ | @@ -12,13 +12,8 @@ | ||
| 12 | "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | 12 | "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", |
| 13 | "wdBean@../wdBean": "wdBean@../wdBean", | 13 | "wdBean@../wdBean": "wdBean@../wdBean", |
| 14 | "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | 14 | "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", |
| 15 | - "wdHwAbility@../wdHwAbility": "wdHwAbility@../wdHwAbility", | ||
| 16 | - "wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge", | ||
| 17 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | 15 | "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", |
| 18 | - "wdLogin@../wdLogin": "wdLogin@../wdLogin", | ||
| 19 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 20 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 21 | - "wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent" | 16 | + "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork" |
| 22 | }, | 17 | }, |
| 23 | "packages": { | 18 | "packages": { |
| 24 | "@ohos/axios@2.2.0": { | 19 | "@ohos/axios@2.2.0": { |
| @@ -63,24 +58,6 @@ | @@ -63,24 +58,6 @@ | ||
| 63 | "resolved": "../../commons/wdConstant", | 58 | "resolved": "../../commons/wdConstant", |
| 64 | "registryType": "local" | 59 | "registryType": "local" |
| 65 | }, | 60 | }, |
| 66 | - "wdHwAbility@../wdHwAbility": { | ||
| 67 | - "name": "wdhwability", | ||
| 68 | - "resolved": "../wdHwAbility", | ||
| 69 | - "registryType": "local", | ||
| 70 | - "dependencies": { | ||
| 71 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 72 | - "wdLogin": "file:../../features/wdLogin", | ||
| 73 | - "wdKit": "file:../../commons/wdKit", | ||
| 74 | - "wdBean": "file:../../features/wdBean", | ||
| 75 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 76 | - }, | ||
| 77 | - "packageType": "InterfaceHar" | ||
| 78 | - }, | ||
| 79 | - "wdJsBridge@../../commons/wdJsBridge": { | ||
| 80 | - "name": "wdjsbridge", | ||
| 81 | - "resolved": "../../commons/wdJsBridge", | ||
| 82 | - "registryType": "local" | ||
| 83 | - }, | ||
| 84 | "wdKit@../../commons/wdKit": { | 61 | "wdKit@../../commons/wdKit": { |
| 85 | "name": "wdkit", | 62 | "name": "wdkit", |
| 86 | "resolved": "../../commons/wdKit", | 63 | "resolved": "../../commons/wdKit", |
| @@ -90,19 +67,6 @@ | @@ -90,19 +67,6 @@ | ||
| 90 | "@umeng/analytics": "^1.0.19" | 67 | "@umeng/analytics": "^1.0.19" |
| 91 | } | 68 | } |
| 92 | }, | 69 | }, |
| 93 | - "wdLogin@../wdLogin": { | ||
| 94 | - "name": "wdlogin", | ||
| 95 | - "resolved": "../wdLogin", | ||
| 96 | - "registryType": "local", | ||
| 97 | - "dependencies": { | ||
| 98 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 99 | - "wdKit": "file:../../commons/wdKit", | ||
| 100 | - "wdWebComponent": "file:../../commons/wdWebComponent", | ||
| 101 | - "wdBean": "file:../../features/wdBean", | ||
| 102 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 103 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 104 | - } | ||
| 105 | - }, | ||
| 106 | "wdNetwork@../../commons/wdNetwork": { | 70 | "wdNetwork@../../commons/wdNetwork": { |
| 107 | "name": "wdnetwork", | 71 | "name": "wdnetwork", |
| 108 | "resolved": "../../commons/wdNetwork", | 72 | "resolved": "../../commons/wdNetwork", |
| @@ -112,30 +76,6 @@ | @@ -112,30 +76,6 @@ | ||
| 112 | "wdKit": "file:../wdKit", | 76 | "wdKit": "file:../wdKit", |
| 113 | "@ohos/axios": "^2.1.1" | 77 | "@ohos/axios": "^2.1.1" |
| 114 | } | 78 | } |
| 115 | - }, | ||
| 116 | - "wdRouter@../../commons/wdRouter": { | ||
| 117 | - "name": "wdrouter", | ||
| 118 | - "resolved": "../../commons/wdRouter", | ||
| 119 | - "registryType": "local", | ||
| 120 | - "dependencies": { | ||
| 121 | - "wdKit": "file:../wdKit", | ||
| 122 | - "wdBean": "file:../../features/wdBean", | ||
| 123 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 124 | - "wdConstant": "file:../../commons/wdConstant" | ||
| 125 | - } | ||
| 126 | - }, | ||
| 127 | - "wdWebComponent@../../commons/wdWebComponent": { | ||
| 128 | - "name": "wdwebcomponent", | ||
| 129 | - "resolved": "../../commons/wdWebComponent", | ||
| 130 | - "registryType": "local", | ||
| 131 | - "dependencies": { | ||
| 132 | - "wdConstant": "file:../wdConstant", | ||
| 133 | - "wdKit": "file:../wdKit", | ||
| 134 | - "wdJsBridge": "file:../wdJsBridge", | ||
| 135 | - "wdBean": "file:../../features/wdBean", | ||
| 136 | - "wdRouter": "file:../wdRouter", | ||
| 137 | - "wdNetwork": "file:../wdNetwork" | ||
| 138 | - } | ||
| 139 | } | 79 | } |
| 140 | } | 80 | } |
| 141 | } | 81 | } |
-
Please register or login to post a comment