| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import {YtAvoid, YTHeader, yTRouter } from 'basic'
- import { webview } from '@kit.ArkWeb'
- @Builder
- function agreementBuilder() {
- NavDestination() {
- AgreementPage()
- }
- .hideTitleBar(true)
- }
- @Component
- struct AgreementPage {
- @State title: '隐私政策' | '关于我们' | '用户协议' = '隐私政策'
- @StorageProp(YtAvoid.safeTopKey) safeTop: number = 0
- @StorageProp(YtAvoid.safeBottomKey) safeBottom: number = 0
- controller: webview.WebviewController = new webview.WebviewController()
- aboutToAppear(): void {
- this.title = yTRouter.getAgreementPageParam()
- // IBestToast.showLoading({
- // message: '加载中...'
- // })
- }
- build() {
- Column({ space: 12 }) {
- YTHeader({ title: this.title })
- Column() {
- Web({ src: 'https://www.baidu.com', controller: this.controller })
- .width('100%')
- .layoutWeight(1)
- .onPageEnd(() => {
- // IBestToast.hide()
- })
- }
- .padding({ left: 16, right: 16 })
- }
- .padding({ top: this.safeTop, bottom: this.safeBottom })
- }
- }
|