<template>
	<view class="container clearfix rich-text-temp">
		<view class="content-title">{{ title }}</view>
		<rich-text-template ref="childTemplate"></rich-text-template>
	</view>
</template>

<script>
	import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
	
	var self
	export default{
		components: {
		   richTextTemplate
		},
		data() {
			return{
				title:'',
				type: 'introduction'
			}
		},
		onLoad(option){
			this.GetNewsCapacity(option.id)
		},
		methods:{
			GetNewsCapacity(id){
				this.CommonService.GetNewsCapacity({id:id}).then(response =>{
					let data =response.data
					let html = this.$api.adaptRichTextImg(data.capacity)
					this.title = data.title
					this.$refs.childTemplate.html = html
				}).catch(error =>{
					this.$util.msg(error.msg,2000)
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #FFFFFF;
	}
	.content-title{
		width: 100%;
		height: auto;
		line-height: 40rpx;
		text-align: center;
		color: #333333;
		font-size: $font-size-32;
		font-weight: bold;
		padding-top: 40rpx;
		box-sizing: border-box;
		padding: 40rpx 40rpx 20rpx 40rpx;
	}
</style>
