<template>
	<view class="richText">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	import { cms } from '@/apis/interfaces/public.js'
	export default {
		data() {
			return {
				content: ''
			};
		},
		created() {
			uni.setNavigationBarTitle({
				title: '服务协议'
			})
			cms(this.$Route.query.id).then(res => {
				let { content, title } = res
				this.content = content;
				uni.setNavigationBarTitle({
					title
				})
			}).catch(err => {
				uni.showToast({
					title: err.message,
					icon : 'none'
				})
			})
		}
	}
</script>

<style lang="scss">
	.richText{
		padding: 30rpx;
	}
</style>
