wangliang_wd

feat:优化启动广告

... ... @@ -8,7 +8,6 @@ import LaunchDataModel, { defaultLaunchModel } from '../viewModel/LaunchDataMode
import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index';
import { ContentDTO } from 'wdBean/Index';
@Entry
@Component
struct LaunchAdvertisingPage {
... ... @@ -19,6 +18,18 @@ struct LaunchAdvertisingPage {
@State defaultModel:defaultLaunchModel = new defaultLaunchModel()
@State dataModel : LaunchDataModel = {} as LaunchDataModel
private controller:VideoController | undefined;
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
@State isPad:boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"?true:false
currentChanged(){
if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
//大屏幕 折叠屏 或者ipad
this.isPad = true
}else {
this.isPad = false
}
}
enter() {
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
... ... @@ -78,7 +89,7 @@ struct LaunchAdvertisingPage {
}else {
//显示图片
Image(this.defaultModel.bootScreenUrl)
.objectFit(ImageFit.Contain)
.objectFit(this.isPad?ImageFit.Contain:ImageFit.Fill)
// .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.width('100%')
.height('100%')
... ...