<template>
	<view>
		<web-view :src="webUrl" @message="onMessage"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				webUrl: ''
			};
		},
		created() {
			this.webUrl = this.$Route.query.url
		},
		methods: {
			onMessage(e){
				let { data } = e.detail
				data.map(val => {
					if(val.type === 'back'){
						this.$Route.back()
						return
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
