Showing
1 changed file
with
10 additions
and
1 deletions
| @@ -7,7 +7,6 @@ import LaunchDataModel, { defaultLaunchModel } from '../viewModel/LaunchDataMode | @@ -7,7 +7,6 @@ import LaunchDataModel, { defaultLaunchModel } from '../viewModel/LaunchDataMode | ||
| 7 | 7 | ||
| 8 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; | 8 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; |
| 9 | import { ContentDTO } from 'wdBean/Index'; | 9 | import { ContentDTO } from 'wdBean/Index'; |
| 10 | -import { Core } from '@ohos/hypium'; | ||
| 11 | 10 | ||
| 12 | 11 | ||
| 13 | @Entry | 12 | @Entry |
| @@ -19,6 +18,8 @@ struct LaunchAdvertisingPage { | @@ -19,6 +18,8 @@ struct LaunchAdvertisingPage { | ||
| 19 | 18 | ||
| 20 | @State defaultModel:defaultLaunchModel = new defaultLaunchModel() | 19 | @State defaultModel:defaultLaunchModel = new defaultLaunchModel() |
| 21 | 20 | ||
| 21 | + private controller:VideoController | undefined; | ||
| 22 | + | ||
| 22 | enter() { | 23 | enter() { |
| 23 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) | 24 | WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) |
| 24 | clearInterval(this.timer) | 25 | clearInterval(this.timer) |
| @@ -60,6 +61,14 @@ struct LaunchAdvertisingPage { | @@ -60,6 +61,14 @@ struct LaunchAdvertisingPage { | ||
| 60 | Column(){ | 61 | Column(){ |
| 61 | if(this.defaultModel.showType === '1'){ | 62 | if(this.defaultModel.showType === '1'){ |
| 62 | //显示视频播放 | 63 | //显示视频播放 |
| 64 | + Video({ | ||
| 65 | + src: this.defaultModel.bootVideoUrl, | ||
| 66 | + previewUri: this.defaultModel.bootVideoScreenUrl, | ||
| 67 | + controller: this.controller | ||
| 68 | + }) | ||
| 69 | + .objectFit(ImageFit.Contain) //设置视频适配模式 | ||
| 70 | + .width('100%') | ||
| 71 | + .height('100%') | ||
| 63 | }else { | 72 | }else { |
| 64 | //显示图片 | 73 | //显示图片 |
| 65 | Image(this.defaultModel.bootScreenUrl) | 74 | Image(this.defaultModel.bootScreenUrl) |
-
Please register or login to post a comment