richText.vue
661 字节
<template>
<u-navbar bgColor="#F6F8FA" :title="title" :placeholder="true" autoBack></u-navbar>
<view class="u-content">
<u-parse :content="content"></u-parse>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getcompact,getprivacyPolicy } from '@/api'
const content = ref(''),
title = ref('')
onLoad(async (e) => {
if (e.type === '4') {
content.value = await getcompact()
title.value = '用户协议'
return
}
content.value = await getprivacyPolicy()
title.value = '隐私政策'
})
</script>
<style lang="scss" scoped>
.u-content {
padding: 24rpx;
}
</style>