<template>
	<view class="news">
	  <view class="u-content padding" :selectable="true">
	  	<u-parse  :html="content"></u-parse>
	  </view>
	</view>
</template>

<script>
	export default {
	 data() {
	 	return {
	 		content:''
	 	};
	 },
	 onLoad(options) {
	 	const that = this
	 	uni.showLoading({
	 		title: '正在加载',
			mask:true
	 	})
	 	that.$api.request('news', 'getNewsDetail', {
	 		id: options.id
	 	}, failres => {
	 		that.$api.msg(failres.errmsg)
	 		uni.hideLoading()
	 	}).then(res => {
	 		that.content = res.data.content
			uni.setNavigationBarTitle({
				title:res.data.title
			})
	 		uni.hideLoading()
	 	})
	 },
	}
	
</script>

<style  scoped>
	.news{
		background-color: white;
	}
	.u-content {
			/* margin-top: 100rpx; */
	}
	page, .content {
		background:#fff;
	}
</style>
