index.vue 866 B

123456789101112131415161718192021222324252627282930313233
  1. <route lang="json">
  2. {
  3. "style": {
  4. "navigationBarTitleText": "",
  5. "navigationBarBackgroundColor": "#fff"
  6. }
  7. }
  8. </route>
  9. <script setup lang="ts">
  10. import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html.vue'
  11. import { fakeThis } from '@/core/libs/requests'
  12. const type = ref()
  13. const { data: content, run: setData } = useRequest(() => fakeThis({ agreement: type.value }))
  14. onLoad(async (query?: Record<string | 'title' | 'type', string>) => {
  15. if (query?.title) {
  16. await uni.setNavigationBarTitle({ title: query.title })
  17. }
  18. if (query?.type) {
  19. type.value = query.type
  20. }
  21. await setData()
  22. })
  23. </script>
  24. <template>
  25. <mpHtml :content="content"></mpHtml>
  26. <!-- <web-view-->
  27. <!-- :src="`https://www.zhuchaohui.com/app-api/infra/file/download?agreement=${type}`"-->
  28. <!-- ></web-view>-->
  29. </template>
  30. <style scoped lang="scss"></style>