<template>
	<view>
		<web-view webview-styles="width:'100%';height:'98px'" update-title='false' :src='protoDes'></web-view>	
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				protoDes:'',
				titleVal:'5555',
				timer:null
			}
		},
		onLoad(options) {
			console.log(options,'xieyi');
			const {name,url}=JSON.parse(decodeURIComponent(options.mydata))
			this.timer=setTimeout(()=>{
				uni.setNavigationBarTitle({
					title:name
				})
			},500)
		
			this.protoDes=url
			this.titleVal=name
			
		},
		onReady() {
			this.timer=setTimeout(()=>{
				uni.setNavigationBarTitle({
				title:this.titleVal
				})
			},500)
		},
		onUnload(){
			if(this.timer){
				console.log(3333);
				clearTimeout(this.timer)
				this.timer=null
			}
		},
		//返回监听
		onBackPress(){
			if(this.timer){
				console.log(444);
				clearTimeout(this.timer)
				this.timer=null
			}
		},
		methods: {
			
		}
	}
</script>

<style>
.web-top{
	width: 100%;
	padding-top:180rpx;
	height: 98rpx;
	
}
</style>
