<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{
				serverUrl: '',
				type: ''
			}
		},
		onLoad(){
			this.serverUrl = '/home/afterSale';
			this.type = 'shoppingNotes';
			this.initData();
		},
		methods:{
			initData(){
				this.CommonService.QueryAfterSale().then(response =>{
					let _data =response.data;
					let	type = this.type;
					if(type) {
						let html = this.$api.adaptRichTextImg(_data[type]);
						this.$refs.childTemplate.html = html;
					}
				}).catch(error =>{
					this.$util.msg(error.msg,2000);
				})
			}
		}
	}
</script>

<style lang="scss">

</style>