<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'){
						uni.navigateBack()
						return
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
