<template>
    <z-paging ref="paging" safe-area-inset-bottom scroll-with-animation>
        <template #top>
            <ut-navbar :title="title" :fixed="false" border></ut-navbar>
        </template>
        <view class="p-rtv pd-20 c-#333 f-s-28 lh-1.6">
            <up-parse :content="content"></up-parse>
        </view>
    </z-paging>
</template>
<script setup lang="ts">
import { recursiveDecodeURIComponentSimple } from '@/utils/ruoyi';

const content = ref<string>('');
const title = ref('');
const paging = ref();

onLoad((options) => {
    // 设置标题
    const obj = recursiveDecodeURIComponentSimple(options);
    console.log(obj);
    
    uni.setNavigationBarTitle({ title: obj?.title || '-' });
    title.value = obj.title || '-';
    obj.url && uni.request({
        url: obj.url,
        success: (res: any) => {
            // 只要body内容
            content.value = res.data as string;
        },
    });
});
</script>
