<route lang="json">
{
  "style": {
    "navigationBarTitleText": "",
    "navigationBarBackgroundColor": "#fff"
  }
}
</route>
<script setup lang="ts">
import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html.vue'
import { fakeThis } from '@/core/libs/requests'

const type = ref()
const { data: content, run: setData } = useRequest(() => fakeThis({ agreement: type.value }))
onLoad(async (query?: Record<string | 'title' | 'type', string>) => {
  if (query?.title) {
    await uni.setNavigationBarTitle({ title: query.title })
  }
  if (query?.type) {
    type.value = query.type
  }
  await setData()
})
</script>

<template>
  <mpHtml :content="content"></mpHtml>
  <!--  <web-view-->
  <!--    :src="`https://www.zhuchaohui.com/app-api/infra/file/download?agreement=${type}`"-->
  <!--  ></web-view>-->
</template>

<style scoped lang="scss"></style>
