<template>
<view class="rich">
	<u-navbar  height="50" :autoBack="true">
		<view
			class="u-nav-slot"
			slot="left"
		>
			<u-icon
				name="arrow-left"
				size="19"
			></u-icon>
			<view class="title">
				{{title}}
			</view>
		</view>
	</u-navbar>
	<view class="text">
		<u-parse :content="content"></u-parse>
	</view>
</view>
</template>

<script>
import {getRichText} from '@/common/api.js'
export default{
	data(){
		return{
			title:"",
			content: ""
		}
	},
	onLoad(options) {
		this.getRichTextHandle(options.id)
	},
	methods:{
		getRichTextHandle(id){
			getRichText({ids:id}).then(res => {
				console.log(res)
				this.title = res.title
				this.content = res.content
			})
		}
		
	}
}
</script>

<style lang="scss" scoped>

/deep/.u-nav-slot{
	display: flex;
	align-items: center;
	.title{
		font-size: 36upx;
		color: #222222;
	}
}
.rich{
	min-height: calc(100vh);
	background-color: #ffffff;
	.text{
		border-top:1px solid transparent;
		margin:120upx 24upx 24upx 24upx;
		
	}
}
</style>