import { webview } from '@kit.ArkWeb'
import { YTHeader } from 'basic'

@Builder
function userAgreementBuilder() {
  NavDestination() {
    UserAgreementPage()
  }.title("用户协议")
  .hideTitleBar(true)
}

@Component
struct UserAgreementPage {
  private webviewController: WebviewController = new webview.WebviewController()

  build() {
    Column() {
      YTHeader({ title: '用户协议' })
      Web({
        src: "https://hm-test.ytpm.net/decisionUserAgreent",
        controller: this.webviewController,
        renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
      })
        .padding(40)
        .width('100%')
        .layoutWeight(1)
    }
  }
}