<template>
	<view>
		<u-parse :content="article"></u-parse>
	</view>
</template>

<script>
	import uParse from '@/components/u-parse/u-parse.vue'
	export default {
		components: {
			uParse
		},
		data(){
			return {
				id: '',
				title: '',
				article: ''
			}
		},
		onLoad(options){
			// 富文本解析文档：https://ext.dcloud.net.cn/plugin?id=183
			this.id = options.id || '';
			this.title = options.title || '';
			// todo 此处根据文章id获取
			this.id && this.getDetail();
		},
		onReady(){
			uni.setNavigationBarTitle({
				title: this.title
			})
		},
		methods: {
			getDetail(){
				console.log("this.id", this.id);
			}
		}
	}
</script>

<style>
	@import url("@/components/u-parse/u-parse.css");
</style>
