import { YTAvoid, YTHeader, yTRouter } from 'basic'; import { webview } from '@kit.ArkWeb'; @Builder function PrivacyBuilder() { NavDestination() { Privacy() }.title("隐私政策") .hideTitleBar(true) } @Component export struct Privacy { @State content: string = ''; @StorageProp(YTAvoid.SAFE_BOTTOM_KEY) safeBottom: number = 0 @StorageProp(YTAvoid.SAFE_TOP_KEY) safeTop:number=0 private webviewController: WebviewController = new webview.WebviewController() build() { Column() { Row() { Image($r('app.media.ic_back')) .width(24) .margin({ left: 16 }) .onClick(()=>{ yTRouter.routerBack() }) Text('隐私政策') Column(){ }.width(24) .height(24) } .width('100%') .justifyContent(FlexAlign.SpaceBetween) .height(44 + this.safeTop) .padding({ top: this.safeTop }) Web({ src: "https://hm-test.ytpm.net/woodenfishPrivatePolicy", controller: this.webviewController, renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式 }).margin({bottom:40}) } .width('100%') .height('100%') .padding({left:20,right:20,bottom:40}) } }