wangliang_wd

feat:优化启动广告

@@ -8,7 +8,6 @@ import LaunchDataModel, { defaultLaunchModel } from '../viewModel/LaunchDataMode @@ -8,7 +8,6 @@ import LaunchDataModel, { defaultLaunchModel } from '../viewModel/LaunchDataMode
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 10
11 -  
12 @Entry 11 @Entry
13 @Component 12 @Component
14 struct LaunchAdvertisingPage { 13 struct LaunchAdvertisingPage {
@@ -19,6 +18,18 @@ struct LaunchAdvertisingPage { @@ -19,6 +18,18 @@ struct LaunchAdvertisingPage {
19 @State defaultModel:defaultLaunchModel = new defaultLaunchModel() 18 @State defaultModel:defaultLaunchModel = new defaultLaunchModel()
20 @State dataModel : LaunchDataModel = {} as LaunchDataModel 19 @State dataModel : LaunchDataModel = {} as LaunchDataModel
21 private controller:VideoController | undefined; 20 private controller:VideoController | undefined;
  21 + @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
  22 +
  23 + @State isPad:boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"?true:false
  24 +
  25 + currentChanged(){
  26 + if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
  27 + //大屏幕 折叠屏 或者ipad
  28 + this.isPad = true
  29 + }else {
  30 + this.isPad = false
  31 + }
  32 + }
22 33
23 enter() { 34 enter() {
24 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) 35 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
@@ -78,7 +89,7 @@ struct LaunchAdvertisingPage { @@ -78,7 +89,7 @@ struct LaunchAdvertisingPage {
78 }else { 89 }else {
79 //显示图片 90 //显示图片
80 Image(this.defaultModel.bootScreenUrl) 91 Image(this.defaultModel.bootScreenUrl)
81 - .objectFit(ImageFit.Contain) 92 + .objectFit(this.isPad?ImageFit.Contain:ImageFit.Fill)
82 // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) 93 // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
83 .width('100%') 94 .width('100%')
84 .height('100%') 95 .height('100%')