<template>
	<view>
		<u-navbar class="u-navbar-box" :title="data.info.title??'用户协议'" placeholder bgColor="transparent" autoBack />
		<view style="padding: 30rpx;">
			<!-- <view style="text-align: center;margin-bottom: 20rpx;font-weight: bold;font-size: 35rpx;">{{data.info.title}}</view> -->
			<up-parse :content="data.info.content"/>
		</view>
	</view>
</template>

<script setup>
	import {
		onMounted,
		reactive
	} from 'vue';
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		getProtocolInfo
	} from '@/common/config/application-api.js'


	const data = reactive({
		id: 0,
		info: {}
	})

	function init() {
		getProtocolInfo({
			id: data.id
		}).then(res => {
			data.info = res;
			// console.log(data);
			// console.log('getProtocolInfo=>', data);
		})
	}

	onLoad((params) => {
		if (params.id) data.id = params.id;
		init();
	})
</script>

<style>
	page {
		background-color: #F6FAFF;
	}
</style>
<style lang="scss" scoped>
	:deep(.u-navbar__content__title) {
		font-weight: bold;
		font-size: 36rpx;
		color: #222222;
	}

	.u-navbar-box {
		background: radial-gradient(circle at left, #FFE5E4 0%, #EEF2F5 40%, #DBEEFB 100%);
	}
</style>