<template>
  <view>
    <view class="w-100px h-250px relative">
      <view class="text-16px font-600 mb-30px text-center">个人信息保护政策</view>
      <web-view src="https://zh.uniapp.dcloud.io/" class="mt-30px h-400px relative" />
    </view>
    <template #confirmButton>
      <view class="gap-20px flex justify-between text-center">
        <view class="btn-default flex-1" @click="onNotAgree">不同意</view>
        <view class="btn-primary flex-1" @click="onAgree">同意</view>
      </view>
    </template>
  </view>
</template>

<script setup lang="ts">
  defineOptions({ name: 'PrivacyModal' })

  const emit = defineEmits<{
    (e: 'privacy', data: boolean): void
  }>()
  const show = ref(false)

  const onNotAgree = () => {
    emit('privacy', false)
    show.value = false
  }
  const onAgree = () => {
    emit('privacy', true)
    show.value = false
  }

  onMounted(() => {})
</script>
