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

<script>
	import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
	export default{
		components: {
		   richTextTemplate
		},
		data() {
			return{
				type: '',
				id:''
			}
		},
		onLoad(option){
			this.type = 'afterSale';
			this.id= option.clauseId
			this.initData();
		},
		methods:{
			initData(){
				let self = this;
				this.OtherService.QuerySaveClause({clauseId:this.id}).then(response =>{
						let data =response.data.content
						self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
				}).catch(error =>{
					this.$util.msg(error.msg,2000)
				})
			}
		}
	}
</script>

<style lang="scss">
	.container{
		background: #fff;
	}
	.rich-text-temp rich-text.h4, .rich-text-temp rich-text.p {
		color: #666666;
	}
	.rich-text-temp rich-text.h4, .rich-text-temp rich-text.p:nth-child(1) {
		color: #333333;
		text-align: center;
		font-weight: bold;
	}
</style>
