campus-errand/miniapp/pages/config/privacy.vue
2026-03-12 18:12:10 +08:00

59 lines
890 B
Vue

<template>
<view class="privacy-page">
<rich-text v-if="content" :nodes="content" class="rich-content"></rich-text>
<view v-else class="empty-tip">
<text>暂无内容</text>
</view>
</view>
</template>
<script>
import { getPrivacy } from '../../utils/api'
export default {
data() {
return {
content: ''
}
},
onLoad() {
this.loadContent()
},
methods: {
/** 加载隐私政策内容 */
async loadContent() {
try {
const res = await getPrivacy()
this.content = res?.value || res?.content || ''
} catch (e) {
// 静默处理
}
}
}
}
</script>
<style scoped>
.privacy-page {
min-height: 100vh;
background-color: #ffffff;
padding: 30rpx;
}
.rich-content {
font-size: 28rpx;
color: #333333;
line-height: 1.8;
}
.empty-tip {
text-align: center;
padding: 100rpx 0;
}
.empty-tip text {
font-size: 28rpx;
color: #999999;
}
</style>