index.vue 949 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <z-paging ref="paging" safe-area-inset-bottom scroll-with-animation>
  3. <template #top>
  4. <ut-navbar :title="title" :fixed="false" border></ut-navbar>
  5. </template>
  6. <view class="p-rtv pd-20 c-#333 f-s-28 lh-1.6">
  7. <up-parse :content="content"></up-parse>
  8. </view>
  9. </z-paging>
  10. </template>
  11. <script setup lang="ts">
  12. import { recursiveDecodeURIComponentSimple } from '@/utils/ruoyi';
  13. const content = ref<string>('');
  14. const title = ref('');
  15. const paging = ref();
  16. onLoad((options) => {
  17. // 设置标题
  18. const obj = recursiveDecodeURIComponentSimple(options);
  19. console.log(obj);
  20. uni.setNavigationBarTitle({ title: obj?.title || '-' });
  21. title.value = obj.title || '-';
  22. obj.url && uni.request({
  23. url: obj.url,
  24. success: (res: any) => {
  25. // 只要body内容
  26. content.value = res.data as string;
  27. },
  28. });
  29. });
  30. </script>