<template>
	<block>
		<model1 v-if="modelId==3||modelId==1" :cardInfo='templateData' :isShare='isShare' :isLook='isLook'></model1>
		<model2 v-if="modelId==2" :cardInfo='templateData' :isShare='isShare' :isLook='isLook'></model2>
	</block>
</template>

<script>
	import model1 from './modeltemplate/model_1.vue';
	import model2 from './modeltemplate/model_2.vue'
	export default {
		props: {
			templateData: {
				type: Object,
				default: ()=>{
					return {}
				}
			},
			isShare:{
				type: Boolean,
				default:false
			},
			//1为模板2为用户
			isLook:{
				type: Number,
				default:0
			},
			modelId:{
				type: Number,
				default:0
			},
		},
		components: {
			model1,
			model2
		},
		data() {
			return {
				model: 0
			}
		},
		onLoad() {
			console.log('233');
			uni.postMessage('打开页面')
		},
		onUnload() {
			uni.postMessage('关闭页面')
		}
	}
</script>
