<template>
	<web-view :src="url+'?data='+data " @message="postMessage2" ></web-view>
</template>
<script>
	export default {
		data() {
			return {
				url: "",
				data:'',
				index:0,
			}
		},
		onLoad: function(option) { //option为object类型，会序列化上个页面传递的参数
			this.url = decodeURIComponent(option.u)
			this.data = decodeURIComponent(option.data)
			if(option.index){
				this.index = decodeURIComponent(option.index)
			}
			
			
			
		},
		methods:{
			postMessage2(data){
				console.log(data,'data2')
				let currentPages = getCurrentPages();
				let beforePage =  currentPages[currentPages.length - 2];
				
				beforePage.$vm.getPCfile(data.detail,this.index)
				
			}
		}
	}
</script>

<style>

</style>