Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangliang_wd
2024-07-29 17:48:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7cf84bf895b02c4af60dbc17c96eeb365f0edb5f
7cf84bf8
1 parent
e354df7e
feat:优化启动广告
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
7cf84bf
...
...
@@ -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%')
...
...
Please
register
or
login
to post a comment